Skip to Content.
Sympa Menu

freetds - Re: Problems with binary columns longer than 127

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Stefan Bodewig <bodewig AT bost.de>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Cc: freetds-jdbc-bugs AT internetcds.com, freetds-jdbc-bugs AT aedinc.net
  • Subject: Re: Problems with binary columns longer than 127
  • Date: 29 Mar 2000 13:49:58 +0200


>>>>> "VT" == Valentin Todorov <valentin.todorov AT sea.ericson.se> writes:

VT> When querying a table which has binary column(s) longer than 127,
VT> ResultSet.next() throws an Exception NegativeArraySizeException.

The following patch seems to fix the problem for me though I'm not to
sure about any side effects involved. Please give it a try Valentin.

Cheers

Stefan

--- orig/Tds.java Fri Jan 28 04:54:16 2000
+++ Tds.java Wed Mar 29 13:33:08 2000
@@ -1933,7 +1933,7 @@
case SYBVARBINARY:
case SYBBINARY:
{
- int len = comm.getByte();
+ int len = comm.getByte() & 0xFF;
byte data[] = comm.getBytes(len);

element = data;




Archive powered by MHonArc 2.6.24.

Top of Page