8 messages in com.mysql.lists.plusplusRe: compiling mysql++ examples (fwd)
FromSent OnAttachments
Enrique Farfan05 Oct 2004 09:51 
Warren Young05 Oct 2004 13:08 
Don Thompson08 Oct 2004 10:22.txt
Warren Young08 Oct 2004 10:59 
Don Thompson08 Oct 2004 11:40 
Warren Young08 Oct 2004 12:59 
Don Thompson08 Oct 2004 18:22 
Chris Frey09 Oct 2004 11:07 
Subject:Re: compiling mysql++ examples (fwd)
From:Warren Young (mysq@etr-usa.com)
Date:10/08/2004 12:59:05 PM
List:com.mysql.lists.plusplus

Don Thompson wrote:

You're right, the junk was test code with const qualifier, but it should be removed for my example, ie query.insert(*this). Using this change, I get the complaint about const: I know we're getting into c++ issues here.

Wait just a minute....it seems that you're trying to insert an arbitrary C++ class into the database. That cannot work. This is not Java and, and MySQL is not an OODB!

You need to use the SQLSS mechanism; in order to copy the data from your C++ class to the SQLSS structure, you will create a non-const object on the stack, so constness won't be a problem. See the custom* examples.