Skip to Main Content

Java Programming

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error converting data type varchar to float.

807603Feb 4 2008 — edited Feb 4 2008
Hi All,


I work on a java application and the application is developed using struts frame work, we use tomcat server.

Problem description :
we are using type conversion in the java code and we get the following error :

Exception: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Error converting data type varchar to float.

Below given is a sample code that we used in the coding :

sQuery = "select lab_id,convert(char(12),test_date,1) as testDate,media,sample_num,test_result,lab_name,test_category from " +
"sms_results where spill_id='"+spillId+"'and (media='SOIL' or media='WIPE') order by lab_id asc";

Can I have your thoughts please ??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 3 2008
Added on Feb 4 2008
4 comments
855 views