COUNT field incorrect or syntax error
hi,
PreparedStatement stmt = con.prepareStatement("Insert into uQuestions values(?,?)");
stmt.setInt(1,2);
//stmt.setString(2,s.trim());
Reader rd=new StringReader(s.trim());
stmt.setCharacterStream(2, rd );
System.out.println( stmt.executeUpdate() );
stmt.close();
Result
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error
In place ofsetCharacterStream If I use stmt.setString(2,s.trim())
then it works fine.
Whats the problem there....

