3 messages in com.mysql.lists.plusplusRe: Using "LOAD DATA LOCAL INFILE.......
FromSent OnAttachments
Steffen Schumacher20 Apr 2004 09:56 
Steffen Schumacher21 Apr 2004 01:25 
Sinisa Milivojevic21 Apr 2004 03:48 
Subject:Re: Using "LOAD DATA LOCAL INFILE....." statement with mysql++
From:Sinisa Milivojevic (sin@mysql.com)
Date:04/21/2004 03:48:34 AM
List:com.mysql.lists.plusplus

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

Commands that not return result sets, like the above one are to be executed with exec() method, and not with streams.

Sincerely,