File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL Server 2005 & Microsoft JDBC driver" Watch "SQL Server 2005 & Microsoft JDBC driver" New topic
Author

SQL Server 2005 & Microsoft JDBC driver

Ram Bu
Greenhorn

Joined: Jul 15, 2005
Posts: 13
Hello,

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.

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

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


Ping & DNS - updated with new look and Ping home screen widget
Ram Bu
Greenhorn

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 2005 problems with driver
Hi...jdbc..no active Connections issue...
SQL Server 2000 JDBC Driver Error
no active Connection...jdbc newbie
Why cant connect to another computer in lan?