2 messages in com.mysql.lists.plusplusSV: Using "LOAD DATA LOCAL INFILE.......| From | Sent On | Attachments |
|---|---|---|
| Steffen Schumacher | 21 Apr 2004 03:50 | |
| Sinisa Milivojevic | 24 Apr 2004 04:45 |
| Subject: | SV: Using "LOAD DATA LOCAL INFILE....." statement with mysql++![]() |
|---|---|
| From: | Steffen Schumacher (STE...@tdc.dk) |
| Date: | 04/21/2004 03:50:44 AM |
| List: | com.mysql.lists.plusplus |
right.. I'll fix that, but the exception I'm getting says this: "The used command is not allowed with this MySQL version".
This would mean that even if I were to use the exec() method, then I would still
be getting this error right?
Mvh Steffen Schumacher Systemkonsulent, NSCB (Backbone) TDC Totalløsninger A/S
-----Oprindelig meddelelse----- Fra: Sinisa Milivojevic [mailto:sin...@mysql.com] Sendt: 21. april 2004 12:49 Til: Steffen Schumacher Cc: plus...@lists.mysql.com Emne: Re: Using "LOAD DATA LOCAL INFILE....." statement with mysql++
Steffen Schumacher wrote:
Hi!
First of all, I may be a bit rusty on the exceptionhandling, so please correct
me if I'm doing anything wrong..
From what I gather about the sql statement in the subject, I don't need to do
anything to be able to use it:
"By default, all MySQL clients and libraries are compiled with
--enable-local-infile, to be compatible with MySQL 3.23.48 and before. "
//Taken from
http://camden-www.rutgers.edu/HELP/Internet/mysql/manual_MySQL_Database_Administration.html
Previous I've used the regular C API, where i got it working after using
mysql_options(MYSQL_OPT_LOCAL_INFILE, 1); //approx..
But.. now that I've upgraded to mysql++ I'm having trouble getting this
working..
I'm catching an exception in the catch phrase, but gets an 'abort', when
attempting to throw my own exception type..
try { Query q = this->sql_con->query(); debug++; q << query; debug++; *retval = q.store(); debug++; } catch(exception &er) { delete retval; errstr << "Error conducting query: \"" << query << "\".\nMsg: " << er.what() << "\ndebug: "<< debug << endl; cout << errstr.str(); //The cout completes, but the throw doesn't.. e.setDescription(errstr.str()); throw e; }
/Steffen
Mvh Steffen Schumacher Systemkonsulent, NSCB (Backbone) TDC Totalløsninger A/S
Commands that not return result sets, like the above one are to be executed with exec() method, and not with streams.
--
Sincerely,
-- For technical support contracts, go to https://order.mysql.com/?ref=msmi __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sin...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB /_/ /_/\_, /___/\___\_\___/ Full time Developer and Support Coordinator <___/ www.mysql.com Larnaca, Cyprus




