----- Original Message -----
> From: "ZhangFangXue" <zhangfang...@sogou-inc.com>
> 
> Hi, when I use PreparedStatement in c++ connector, I find some
> unexcepted error,

Well, first of all, you don't actually say what the error is that you're 
seeing. This tends to be on the rather helpful side when trying to diagnose it.

> prep_stmt = con -> prepareStatement ("INSERT INTO City (CityName)
> VALUES (?)");
> prep_stmt -> setInt (1, 23); //this statement didn't act normally!!!

However, if you're inserting into a text field, it may well be that the parser 
will balk at you trying to bind an integer to that, no? If you want to insert a 
string, it's fairly common practice to provide an actual string to insert. 
Quite the novel idea, I know.

-- 
Unhappiness is discouraged and will be corrected with kitten pictures.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to