Skip to Content.
Sympa Menu

freetds - Re: CallableStatement - setString method

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: CallableStatement - setString method
  • Date: Wed, 18 Jul 2001 16:36:10 -0400 (EDT)


On Wed, 18 Jul 2001, Bob Kline wrote:

> If your SQL Server patch level is the same, then I'm baffled.

Well, I'm no longer baffled. The reason I couldn't reproduce your
problem is because I had seen and fixed this bug back in April. Here's
the patch. I'm not 100% certain that my fix is correct for all cases
(it seems more likely that formalType should never be null), but it will
prevent this null pointer exception in all cases, and it causes your
test case to behave properly.

--- freetds_jdbc/Tds.java Fri Feb 9 20:37:33 2001
+++ freetds_jdbc0/Tds.java Mon Apr 30 15:16:32 2001
@@ -2592,7 +2592,8 @@
int len = val != null ? val.length() : 0;
int max = formalParameterList[i].maxLength;

- if (actualParameterList[i].formalType.startsWith("n")) {
+ if (actualParameterList[i].formalType != null &&
+ actualParameterList[i].formalType.startsWith("n")) {
/*
* This is a Unicode column, save to assume TDS 7.0
*/

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com





Archive powered by MHonArc 2.6.24.

Top of Page