This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes JDBC and the fly likes Error: SQL type is not supported by this driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error: SQL type is not supported by this driver" Watch "Error: SQL type is not supported by this driver" New topic
Author

Error: SQL type is not supported by this driver

G Mehta
Greenhorn

Joined: Dec 08, 2004
Posts: 4
Hello,

Please help. I am using weblogic 8.1 and MS SQL Server 2000. Using JDBC. I have am calling a stored procedure which outputs a CURSOR. I haveing problems specifying the right java.sql.Type for this. I tried java.sql.Type.OTHER but it fails. The code is as follows

Connection conn = null;
CallableStatement stmt = null;
String sqlProc = "{ call GetDocumentDetails(?,?) }";
try {
conn = this.getConnection();
stmt = conn.prepareCall(sqlProc);
stmt.setInt(1, docId);
stmt.registerOutParameter(2,Types.OTHER);
stmt.execute();
ResultSet rs = (ResultSet) stmt.getObject(2);
while(rs.next()) {
......
......

The exception that I get is

java.sql.SQLException: [BEA][SQLServer JDBC Driver]The specified SQL type is not supported by this driver.
at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)


PLEASE HELP.

Thanks in advance
GM
[ March 18, 2005: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

"GM72",

You have already been asked, in this topic, to change your display name to conform to JavaRanch standards.

Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

bear
Forum Bartender
[ March 18, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error: SQL type is not supported by this driver