On Fri, 15 Feb 2008, wrote:
> Try this:
>
> q.SQL.Clear;
> q.Add('LOAD DATA INFILE ''data.txt'' INTO TABLE database.my_table;');
> q.Execute; // <-- I don't remember the correct command right now
>
Normally it is:
Q.ExecSQL;
Michael.
___
fpc-pa
Try this:
q.SQL.Clear;
q.Add('LOAD DATA INFILE ''data.txt'' INTO TABLE database.my_table;');
q.Execute; // <-- I don't remember the correct command right now
Leonardo
--- Wolfram Kläger <[EMAIL PROTECTED]> wrote:
> Ok. First one was simple. Keyword and opening bracket must be separated
> by a
Ok. First one was simple. Keyword and opening bracket must be separated
by a blank, e.g.
'.. MYTABLE(..' // wrong
'.. MYTABLE (..' // great
'..)values(..' // wrong
'..) values (..' // great
All field contents have to be bracketed by double apostrophes, e.g.
q.sql.add('''Florian Klaempfl'',')
Along Joost's examples I managed to get connected, create a table, put a
query, get the result, and insert a single row. But when I try to insert
several rows at once, I get an EDatabaseError "near" to first char of
second row.
...
q.SQL.Clear;
q.Add('insert into MYTABLE(c1, c2, ..) values ');
q.A