Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query Encoding

843854Feb 10 2005 — edited Feb 11 2005
Hi Guys,

I am having a problem with some SQL queries, I am making queries but they are coming back with null values as if there are mis-spellings in the queries. The query string is made up within the java app something like this
String sqlStatement = new String ("SELECT COUNT(*) FROM studentlist WHERE surname LIKE '%"+ nextSurname +"'");
If I print the above to the screen, then copy and past it into a query browser it works perfectly so I think it has something to do with the encoding. Does anyone have any suggestions as to what Character encoding I should use?

Dave
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2005
Added on Feb 10 2005
6 comments
244 views