The moose likes JDBC and the fly likes SQL Server 2005 & Microsoft JDBC driver 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 "SQL Server 2005 & Microsoft JDBC driver" Watch "SQL Server 2005 & Microsoft JDBC driver" New topic

SQL Server 2005 & Microsoft JDBC driver

Ram Bu

Joined: Jul 15, 2005
Posts: 13

I just wanted to share this fix with rest of you folks. I spent almost a day trying to fix the problem.

Those who are trying to retrieve data from SQL Server 2005 using Microsoft's JDBC driver might get the following error message.

[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 1 (""): Data type 0x38 is unknown.

All you need to do is change the connection string.

Current : jdbc:microsoft:sqlserver://<ServerName>:<PortNumber>;databaseName=<DatabaseName>;SelectMethod=Cursor

New: jdbc:microsoft:sqlserver://<ServerName>:<PortNumber>;databaseName=<DatabaseName>;SelectMethod=Direct

By changing select method from Cursor to Direct you would be able to retrieve data.

[ March 02, 2007: Message edited by: Ram Bu ]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41052
Thanks for sharing that. What was the SQL statement you were trying to execute?

Ping & DNS - my free Android networking tools app
Ram Bu

Joined: Jul 15, 2005
Posts: 13
Any simple SELECT statements would throw that error message.
I agree. Here's the link: http://aspose.com/file-tools
subject: SQL Server 2005 & Microsoft JDBC driver
Similar Threads
SQL Server 2000 JDBC Driver Error
Hi...jdbc..no active Connections issue...
Why cant connect to another computer in lan?
SQL Server 2005 problems with driver
no active Connection...jdbc newbie