On Sat, 06 Nov 2010 15:36:46 +1100, "Len(c-sharplizards)" <l...@c-sharplizards.com> wrote:
> I do not seem to be able to parse a multiple insert statement through > the odbc drive using SQLExecDirect(...) I have tried with BEGIN, COMMIT > TRANSACTION does anyone have any ideas? You don't give us much to work on. - Which ODBC driver do you use? - What does your "multiple insert statement" look like? - What is the result (error messages, state of the db before and after the statement)? - What do you expect the result to be? For your information, sqlite does not support the form INSERT INTO t (col1,col2) VALUES ('val11','val21'), ('val12','val22'), ('val13','val23'); In general it is a bit challenging to expect that the whole chain supports something like: sql="BEGIN TRANSACTION; INSERT INTO t (col1,col2) VALUES ('val11','val21'); INSERT INTO t (col1,col2) VALUES ('val12','val22'); INSERT INTO t (col1,col2) VALUES ('val13','val23'); COMMIT TRANSACTION;" SQLExecDirect(sql); Better change that to: SQLExecDirect("BEGIN TRANSACTION"); SQLExecDirect("INSERT INTO t (col1,col2) VALUES ('val11','val21')"); SQLExecDirect("INSERT INTO t (col1,col2) VALUES ('val12','val22')"); SQLExecDirect("INSERT INTO t (col1,col2) VALUES ('val13','val23')"); SQLExecDirect("COMMIT TRANSACTION") I hope this helps, if not please take some effort to describe your exact problem. -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users