| View previous topic :: View next topic |
| Author |
Message |
Gerardo Urķas L. Guest
|
Posted: Wed Aug 25, 2004 3:00 am Post subject: SQL Server 2000 and TQuery |
|
|
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
|
Posted: Wed Aug 25, 2004 4:57 pm Post subject: Re: SQL Server 2000 and TQuery |
|
|
<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
|
Posted: Wed Aug 25, 2004 5:52 pm Post subject: Re: SQL Server 2000 and TQuery |
|
|
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
|
Posted: Wed Aug 25, 2004 10:50 pm Post subject: Re: SQL Server 2000 and TQuery |
|
|
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
|
Posted: Thu Aug 26, 2004 4:58 am Post subject: Re: SQL Server 2000 and TQuery |
|
|
"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 |
|
 |
|