[Gambas-user] Transaction processing in Postgresql

Benoit Minisini gambas at ...1...
Thu Feb 3 13:45:04 CET 2005


On Thursday 03 February 2005 12:13, alan wrote:
> I am  trying to move an ACCESS database to GAMBAS & POSTGRESQL.
> As part of this process I want to change the order of the rows in some
> of the tables
> to match the order of the primary key.
>
> The following SQL command when submitted  via PGADMINIII will achive
> this objective:-
>
> BEGIN;
> SELECT * INTO  TEMP footemp   FROM  foo ORDER BY foo_id;
> DELETE  FROM foo;
> INSERT INTO foo  SELECT *  FROM footemp;
> DROP TABLE footemp;
> COMMIT;
>
> This process has to be performed inside a transaction because there are
> constrants
> in other tables in the database  which require some of the values in foo.
>
> When i try to execute the sql commands from within gambas the
> transaction fails
> at the first deletion with an error indicating a broken constaint.
>
> Does this mean  gambas connot handle transactions?
>
> alan
>

Transactions are supported!

Send me your code so that I can see which SQL commands are send to the 
database driver...

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the User mailing list