From: Pierre A. <pie...@op...> - 2003-11-27 15:55:59
|
Carlos Guzm=E1n =C1lvarez wrote: > If you have firebird installed you have isql too, just see in the > firebird bin directory ( isql.exe ). Oh. Thanks ! I was not aware of that. >> So how can I do what I want, namely create a table and fill it >> in, then rollback the table creation ? > > But you don't want to mantain the table created after have it filled ?? > In that case, Why not ?? :) Well, I wanted to create a few tables and fill them and make it look like an atomic operation to other processes; either the tables would be there with their content, or they would not. So in fact what was of interest here was really the fact that the transaction was hiding the tables until the COMMIT. > If you want to mantain it created after have it filled, and drop it if > you get an error, at this moment you can do: > > (1) Start transaction. > (2) Create table. > (3) Commit transaction (using Commit method) > (4) Start transaction. > (5) Fill the Table > (6) Commit transaction (using Commit method) > > if you get an error when filling: > > (1) Rollback transaction. > (2) Drop the table. > > or: > > (1) Start transaction. > (2) Create table. > (3) Commit transction (using CommitRetaining method.) > (4) Fill the Table. > (5) Commit transaction (using Commit method.) > > if you get an error when filling: > > (1) Rollback transaction. > (2) Drop the table. Yes, I guess that this is what I will do, and I will have to add logic to handle the presence of empty tables, but this should not be too complicated. Thanks for your help. Pierre |