Hi thanks for the quick response! Im at a bit of a loss as to the purpose of the boolean argument for execute now. Ive experimeted quickly (after your response) and it seems that if I leave Execute() empty, or provide it with either a true or false argument it makes no difference to the outcome. Unless ALL statements execute fine nothing will be inserted ie it seems that there is an implicit transaction wrapped around ALL statements and that it is not possible to commit after each statement, is this correct?
Eg, the following will NOT insert anything (notice the incorrect syntax in 3rd statement (VALUE not VALUES)) using (FbConnection connection = new FbConnection(connectionString.ToString())) { connection.Open(); FbBatchExecution batch = new FbBatchExecution(connection); try { batch.SqlStatements.Add("INSERT INTO TABLE1 (INTEGERFIELD) VALUES(5);"); batch.SqlStatements.Add("INSERT INTO TABLE1 (INTEGERFIELD) VALUES(6);"); batch.SqlStatements.Add("INSERT INTO TABLE1 (INTEGERFIELD) VALUE(7);"); batch.SqlStatements.Add("INSERT INTO TABLE1 (INTEGERFIELD) VALUES(8);"); batch.Execute(true); } catch (Exception e) { throw e; } } -- View this message in context: http://firebird.1100200.n4.nabble.com/Exception-thrown-when-using-transactions-and-FbBatchExecution-tp2336286p2336333.html Sent from the firebird-net-provider mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider