4 messages in com.mysql.lists.plusplustemplate insert query & mysql++
FromSent OnAttachments
Mark Polsen14 Oct 2000 13:04 
Florian G. Pflug14 Oct 2000 14:35 
Don Thompson15 Oct 2000 08:20 
Don Thompson24 Oct 2000 18:53 
Subject:template insert query & mysql++
From:Mark Polsen (mpol@flashcom.net)
Date:10/14/2000 01:04:43 PM
List:com.mysql.lists.plusplus

Hi All,

I'm having problems with using a template insert query with the mysql++ api. If I remove the tables primary key the insert query works fine, but if the table has a primary key I get the following error:

Error: Column count doesn't match value count at row 1

This has to be due to the way I set up the template query. Here is the test code I am using:

query << "insert into %5:table values (%0q, %1q, %2q, %3q, %4q)"; query.parse(); query.def["table"] = "testtable"; query.execute (2, 4, 6, 8, 1);

How does my insert line need to be changed so my table can have a primary key?

Thanks in advance.

Mark