MySQL Forums
Forum List  »  Connector/C++

Re: prepared statements don't work!
Posted by: Heiko Weber
Date: September 10, 2010 04:40AM

I've the same problem here on a Mac OS X, I executed my prepared statements many many time to "catch" them in a mysql console with "SHOW FULL PROCESSLIST".

I was able to see my "prepared statement" executes without the ? being replaced, i.e.:

std::auto_ptr<sql::PreparedStatement> ps;

...

ps.reset("INSERT INTO a_table (a, b) VALUES (?,?)");
ps->setInt(1, 3);
ps->setInt(2, 4);
ps->execute();

...

actually run the query

INSERT INTO a_table (a, b) VALUES (?,?)

How come?
Heiko

Options: ReplyQuote


Subject
Views
Written By
Posted
3763
August 12, 2010 06:59AM
1651
August 12, 2010 01:10PM
1598
August 14, 2010 09:07AM
2290
August 19, 2010 12:13PM
Re: prepared statements don't work!
1800
September 10, 2010 04:40AM
1551
September 10, 2010 05:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.