File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes MAJOR problem with JDBC-ODBC..please help!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MAJOR problem with JDBC-ODBC..please help!!" Watch "MAJOR problem with JDBC-ODBC..please help!!" New topic

MAJOR problem with JDBC-ODBC..please help!!

Blaine Mincey

Joined: Nov 28, 2000
Posts: 15
Hi. I am having an issue with what I believe to be the JDBC-ODBC bridge. I have used similar SQL at clients using a JDBC Driver but have not used this with JDBC-ODBC. The SQL is rather simple:
// the parameter markers are all strings in the
// format 'string','string','string', etc.
delete from <table> where id not in ( ? ) and
state in ( ? ) and
code in (? )
I keep getting the error:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
Any help would be greatly appreciated....
Blaine Mincey
Blaine Mincey

Joined: Nov 28, 2000
Posts: 15
Well, I was finally able to work around the problem by creating the Statement on the fly instead of using a PreparedStatement. Looks like the more 'elaborate' PreparedStatement was getting hosed through ODBC....if anyone has anything to add, I would love to hear ( read ) it!
Thanks again!
subject: MAJOR problem with JDBC-ODBC..please help!!
Similar Threads
can I change JDBC Driver ?
Configuration of SQL Server 7.0 in Websphere 4.0
exception running with SQL server 2000
jdbc:odbc password definition
What is ODBC