Subject Re: [firebird-support] How SET AUTODDL works?
Author W O
Thank you Dmitry

I had tried it and still doesnt work:

SET AUTODDL ON;

INSERT INTO MyTable (Column1, Column2) VALUES (Value1, Value2);

INSERT INTO MyTable (Column1, Column2) VALUES (OtherValue1, OtherValue2);

QUIT;

And when I return to ISQL and write SELECT * FROM MyTable the two previous
inserts are not there.

I dont understand why at least the first INSERT is not there.

Greetings.

Walter.













On Sun, Jun 23, 2013 at 2:10 PM, Dmitry Kuzmenko <kdv@...> wrote:

> **
>
>
> Hello, W!
>
> Sunday, June 23, 2013, 9:47:54 PM, you wrote:
>
> WO> I usually write a COMMIT or a ROLLBACK when want to finish a
> transaction.
> WO> However in the documentation of ISQL said that SET AUTODDL ON finish
> the
> WO> transaction with a COMMIT.
> remember that ISQL is just a program, that can be rewritten by anyone,
> so, you may design your own SET AUDODDL behavior.
>
> WO> SET AUTODDL ON;
> WO> INSERT INTO MyTable (Column1, Column2) VALUES (Value1, Value2);
> WO> QUIT;
>
> WO> When I return to ISQL the table has not recorded the INSERT. Of
> course, if
> WO> I write EXIT instead of QUIT the INSERT is recorded but that is the
> WO> standard behaviour of ISQL.
>
> Yes, QUIT = ROLLBACK, EXIT = COMMIT.
> And, consider that AUTODDL ON forces commit before NEXT sql statement.
> So, the code here may be like that:
> OnNewStatement
> if InTransaction and AutoDDL then
> Commit;
> ExecuteNewStatement;
>
> --
> Dmitry Kuzmenko, www.ib-aid.com
>
>
>


[Non-text portions of this message have been removed]