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.Add('(r1v1, r1v2, ..),');
q.Add('(r2v1, r2v1, ..),');
..
q.Add(';');

What am I missing or is multiple insert not supported?

Alternatively, MySQL provides the LOAD DATA [LOCAL] INFILE statement. So
far I was not able to find a special sqldb wrapper for it. Is it done
via ExecuteDirect?

Wolfram
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to