Subject | RE: [firebird-support] Re: Copy records - solved |
---|---|
Author | Helen Borrie |
Post date | 2004-08-05T15:19:30Z |
At 05:01 PM 5/08/2004 +0200, you wrote:
you are going to submit any other sort of statement, you don't open
anything, you just test that it is prepared, prepare it if required, and
execute it:
{Sans exception handling, it's bedtime}
with transaction do
b
if not inTransaction then
StartTransaction;
e
with statement do
b
if not Prepared then Prepare;
ExecSQL;
e
.....
transaction.Commit;
/hb
> > >>Violation of PRIMARY or UNIQUE KEY constraints "INTEG_94" on tableYou open and close datasets. Only SELECT statements have datasets. When
> > >>"MATCONTI"
>
>
>I've got it working now!
>I have never worked with ExecSQL before...
>
>Normaly I use folowing:
>- close dataset
>- prepare sql
>- open dataset
>
>So I did it here:
>- close dataset
>- prepare sql
>- open dataset
>- call ExecSQL
>
>sql statement executed twice.
>
>Is this so, that ExecSQL does not need opened dataset ?
you are going to submit any other sort of statement, you don't open
anything, you just test that it is prepared, prepare it if required, and
execute it:
{Sans exception handling, it's bedtime}
with transaction do
b
if not inTransaction then
StartTransaction;
e
with statement do
b
if not Prepared then Prepare;
ExecSQL;
e
.....
transaction.Commit;
/hb