Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

SQL Server 2005 & Microsoft JDBC driver

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing that. What was the SQL statement you were trying to execute?
 
Ram Bu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any simple SELECT statements would throw that error message.
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic