[SQLite3] Multiple Insert
Posted: Sun 22 May 2011 22:15
Hi!
I use UniDAC 3.7 + C++ Builder XE + sqlite3
I want to load my multi-query from file. The problem is that some of my queries are commented and after ExecSQL(); nothing happens.
QueryFile:
C++:
When I delete comments in my file, it's fine, but I don't want to do that...
Help
I use UniDAC 3.7 + C++ Builder XE + sqlite3
I want to load my multi-query from file. The problem is that some of my queries are commented and after ExecSQL(); nothing happens.
QueryFile:
Code: Select all
INSERT INTO tabela(text) VALUES('a');
--INSERT INTO tabela(text) VALUES('b');
-- Some comments here
/*
bla bla bla
*/
INSERT INTO tabela(text) VALUES('c');
...
Code: Select all
...
TUniQuery *q = new TUniQuery(NULL);
q->Connection = SomeConnection;
for(int i=0;iCount;i++)
{
q->SQL->Add( s->Strings[i]); // load each line from file, some are disabled(commented)
}
q->ExecSQL();
delete q;
...
Help