Skip to Content.
Sympa Menu

freetds - Patching FreeTDS for SQLServer2000

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Raul" <spopa AT tiscalinet.it>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Patching FreeTDS for SQLServer2000
  • Date: Mon, 12 Mar 2001 11:12:15 -0500


Please disregard my previous message, it was incomplete
Hi folks
I succeeded in working with FreeTds 0.51 and SQLServer2000 with a small
patch in Statement class code, getMoreResults method .
Without this patch the the very first time i run a statement I
caught a java.sql.SQLException:Protocol confusion. Got a 0x79 packet
I found that if the statement is cached in the system table
syscacheobjects of the Master databases this runs succesfully, otherwise I
catch the Exception. This, of course, doesn't occur in SQL 7.0. I tried
also to low the compatibilty of the Database as SQL7 but without any
results.
By examining the code I found that in the getMoreResults method there's no
reference to the 0x79 packet otherwise declared as TDS_RET_STAT_TOKEN. I
patched the code as made in ResultSet_base class, next method, by adding
the following statement:
if (tds.peek() == Tds.TDS_RET_STAT_TOKEN)
{
tds.processSubPacket();
}
With this small patch the test t0005, otherwise causing an Exception did
OK and the entire my applications too.
I hope this helps for a better patch and compatibility with the latest MS
database.




Archive powered by MHonArc 2.6.24.

Top of Page