e-mail mgbg25171 <mgbg25...@blueyonder.co.uk> wrote: > Howto...multi-sqlite command string through sqlite3_prepare_v2() to create > SINGLE statement
You can't do that. > sql = "BEGIN"; //you need to add newline here > sql += "create table episodes (id integer primary key, season int, name > text)"; > sql += "insert into episodes(id, season, name) Values(1,2,'bill')"; > sql += "insert into episodes(id, season, name) Values(2,3,'bob')"; > sql += "COMMIT"; sqlite3_exec can be used to execute multiple statements like this in a single call. You do need to terminate each statement with a semicolon. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users