答复: 答复: PreparedStatement problem

2013-02-19 Thread ZhangFangXue
: mysql@lists.mysql.com 主题: Re: 答复: PreparedStatement problem - Original Message - > From: "ZhangFangXue" > > well, the problem is that I used it like this: > prep_stmt = con -> prepareStatement ("INSERT INTO City (CityNumber) The statement in your original ma

答复: PreparedStatement problem

2013-02-19 Thread ZhangFangXue
well, the problem is that I used it like this: prep_stmt = con -> prepareStatement ("INSERT INTO City (CityNumber) VALUES (?)"); prep_stmt -> setInt (1, 23); //this statement didn’t act normally!!! then when I execute the statement, the result does not appear to be correct, as CityNumber is not

Re: 答复: PreparedStatement problem

2013-02-19 Thread Johan De Meersman
- Original Message - > From: "ZhangFangXue" > > well, the problem is that I used it like this: > prep_stmt = con -> prepareStatement ("INSERT INTO City (CityNumber) The statement in your original mail used CityName, which sounds like it should be a string. Fieldname confusion? -- Unh