freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- 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
-
CallableStatement - setString method,
Sean, 07/11/2001
- <Possible follow-up(s)>
- Re: CallableStatement - setString method, Bob Kline, 07/11/2001
- Re: CallableStatement - setString method, Sean, 07/18/2001
- Re: CallableStatement - setString method, Bob Kline, 07/18/2001
- Re: CallableStatement - setString method, Bob Kline, 07/18/2001
- Re: CallableStatement - setString method, Sean, 07/24/2001
Archive powered by MHonArc 2.6.24.