BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Wait while AdoCommand.Execute return

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Julian Maisano
Guest





PostPosted: Sat Feb 21, 2004 8:46 am    Post subject: Wait while AdoCommand.Execute return Reply with 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
Ian Boyd
Guest





PostPosted: Sat Feb 21, 2004 8:02 pm    Post subject: Re: Wait while AdoCommand.Execute return Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.