return value of TMyConnection.ExecSQL ?
Posted: Thu 21 Sep 2006 00:27
Hi
I have a couple of questions, so I hope you bear with me please
1- I can see from the dokumentation that TMyConnection.ExecSQL is a function that returns a variant. But what exactley does the return value mean ? When I try to inspect it, the return value is "NULL"....
2- The TMyConnection.ExecSQL takes two parameters, first is SQL statement, second is an array of variant. I do not have any params, so I just make the call: MyConnection1.ExecSQL(SQL, []); Is this the best way to do, when you dont have a any params ? or would this lead to unwanted overhead ?
3- If some error is returned from the MySQL server, can I trust that the TMyConnection.ExecSQL always returns an exception, so I know of the error ?
4- If one has the TMyConnection.ExecSQL, when do one need the TMyCommand ? that is, what advantages does the TMyCommand have over executing directly with TMyConnection.ExecSQL ?
5- And Finally: What is the TMyScript for ? couldnt we just use the TMyCommand or the direct TMyConnection.ExecSQL ? what are the advantages of TMyScript ?
And that concludes my LONG series of questions. I thank you for the good support in this forum. I think I now will be able to finish implimentation and start testing.
Kind regards
I have a couple of questions, so I hope you bear with me please
1- I can see from the dokumentation that TMyConnection.ExecSQL is a function that returns a variant. But what exactley does the return value mean ? When I try to inspect it, the return value is "NULL"....
2- The TMyConnection.ExecSQL takes two parameters, first is SQL statement, second is an array of variant. I do not have any params, so I just make the call: MyConnection1.ExecSQL(SQL, []); Is this the best way to do, when you dont have a any params ? or would this lead to unwanted overhead ?
3- If some error is returned from the MySQL server, can I trust that the TMyConnection.ExecSQL always returns an exception, so I know of the error ?
4- If one has the TMyConnection.ExecSQL, when do one need the TMyCommand ? that is, what advantages does the TMyCommand have over executing directly with TMyConnection.ExecSQL ?
5- And Finally: What is the TMyScript for ? couldnt we just use the TMyCommand or the direct TMyConnection.ExecSQL ? what are the advantages of TMyScript ?
And that concludes my LONG series of questions. I thank you for the good support in this forum. I think I now will be able to finish implimentation and start testing.
Kind regards