 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Julian Maisano Guest
|
Posted: Sat Feb 21, 2004 8:46 am Post subject: Wait while AdoCommand.Execute return |
|
|
(I've written this kind of code all the time and I've never had problems,
but I just want to be sure whether it is fine to write this way or not)
1: AdoCommand.SqlText := INSERT in "table1"
2: AdoCommand.Execute;
3: AdoCommand.SqlText := insert in "table2" that requires data inserted in
"table1" due foreign keys
4: AdoCommand.Execute;
Can the line 4 be executed before that the line 2 has finished?
I mean, does the program stop while line 2 is in execution?
Does it have to do with the rdbms used?
and.. what about ado.net?
|
|
| Back to top |
|
 |
Ian Boyd Guest
|
Posted: Sat Feb 21, 2004 8:02 pm Post subject: Re: Wait while AdoCommand.Execute return |
|
|
By default, all ADO operations are synchronous. i.e. they will not return
until complete.
If you changed it to asynchronous operation, then your code would have
problems. But as it stands, it's fine.
"Julian Maisano" <maisanosys (AT) yahoo (DOT) com> wrote
| Quote: | (I've written this kind of code all the time and I've never had problems,
but I just want to be sure whether it is fine to write this way or not)
1: AdoCommand.SqlText := INSERT in "table1"
2: AdoCommand.Execute;
3: AdoCommand.SqlText := insert in "table2" that requires data inserted in
"table1" due foreign keys
4: AdoCommand.Execute;
Can the line 4 be executed before that the line 2 has finished?
I mean, does the program stop while line 2 is in execution?
Does it have to do with the rdbms used?
and.. what about ado.net?
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|