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 

SQL Server 2000 and TQuery

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Gerardo Urķas L.
Guest





PostPosted: Wed Aug 25, 2004 3:00 am    Post subject: SQL Server 2000 and TQuery Reply with quote



Hello friends...

I have a tQuery component loaded with...

qGeneral.close;
qGeneral.SQL.add('delete from infPrestamos');
qGeneral.SQL.add('delete from infDesembolsos');
qGeneral.SQL.add('delete from infMovimientos');
qGeneral.execSQL;

.... it is supposed to delete every single row in the refered table but
somehow it does not do it always. The tQuery has its Unidirectional property
set to TRUE and I am using the ODBC driver 2000.81.9030.04. The tQuery also
has its Database property set to dbMain which is the only Database component
in the system (set to ReadCommited).

Any ideas ?... any help will be highly appreciated.

Thank you.


Back to top
David Gagnon
Guest





PostPosted: Wed Aug 25, 2004 4:57 pm    Post subject: Re: SQL Server 2000 and TQuery Reply with quote



<from the help> The SQL property may contain only one complete SQL statement
at a time. In general, multiple "batch" statements are not allowed unless a
particular server supports them.


Back to top
Bruce Michener
Guest





PostPosted: Wed Aug 25, 2004 5:52 pm    Post subject: Re: SQL Server 2000 and TQuery Reply with quote



On Wed, 25 Aug 2004 12:57:47 -0400, David Gagnon
<dgagnonATchartermiDOTnet> wrote:

Quote:
from the help> The SQL property may contain only one complete SQL
statement
at a time. In general, multiple "batch" statements are not allowed
unless a
particular server supports them.


You should also clear the SQL property before adding or set the SQL.TEXT

property.

Back to top
Gerardo Urķas L.
Guest





PostPosted: Wed Aug 25, 2004 10:50 pm    Post subject: Re: SQL Server 2000 and TQuery Reply with quote

Thank you both... I will check that out and let you know.

Best regards.

"Bruce Michener" <bmichene (AT) boe (DOT) ca.gov> wrote

Quote:
On Wed, 25 Aug 2004 12:57:47 -0400, David Gagnon
dgagnonATchartermiDOTnet> wrote:

from the help> The SQL property may contain only one complete SQL
statement
at a time. In general, multiple "batch" statements are not allowed
unless a
particular server supports them.


You should also clear the SQL property before adding or set the SQL.TEXT
property.



Back to top
Roham
Guest





PostPosted: Thu Aug 26, 2004 4:58 am    Post subject: Re: SQL Server 2000 and TQuery Reply with quote

"Gerardo Urķas L." <gerardou (AT) xygnus (DOT) com> wrote:
Quote:
Hello friends...

I have a tQuery component loaded with...

qGeneral.close;
qGeneral.SQL.add('delete from infPrestamos');
qGeneral.SQL.add('delete from infDesembolsos');
qGeneral.SQL.add('delete from infMovimientos');
qGeneral.execSQL;

... it is supposed to delete every single row in the refered table but
somehow it does not do it always. The tQuery has its Unidirectional property
set to TRUE and I am using the ODBC driver 2000.81.9030.04. The tQuery also
has its Database property set to dbMain which is the only Database component
in the system (set to ReadCommited).

Any ideas ?... any help will be highly appreciated.

Thank you.

You must issure ExecSQl Command For Each SQL DElete Command To Take Effect.
By.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) 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.