>> I'm writing a program to import some data into a MySQL database. I
>> guessed that the most efficient way of doing this was to use
>> template queries
> LOAD DATA INFILE is probably the most efficient way:
Oh I didn't realise you could load a file locally, I thought it had to
be on the server. Is it possible to set a callback or something for
each row/column being read so you can do everything on the fly? (i.e.
not worrying about creating a file on disk, escaping the data, etc.)
>> It looks like this is because it can only take up to 25 parameters,
>> but the table I am importing into has 40 fields. Is there any way
>> I can work around this limit?
Hmm, okay, that complicates things a bit if I can't rely on a machine's
package management system to have installed mysql++ properly. It says
the reasoning behind the decision was so that it wasn't too complex for
compilers. Any possibility then of doing what Boost does and use
#ifdefs to hide the extra definitions, so you can just #define something
before including the header to get the number of parameters you need?
That would still keep things small for 'simple' compilers.