| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12/14/2005 16:25:33
|
leono
Newbie
Joined: 11/07/2005 13:23:53
Messages: 2
Offline
|
Hi! I'm using jisql on the command line to connect to a MS SQL Server, and all of my varchar values are truncated to 24 characters. I'm using Microsoft's JDBC driver. Any ideas why this truncation might be happening?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12/14/2005 21:44:15
|
stdunbar
Newbie
![[Avatar]](/images/avatar/a87ff679a2f3e71d9181a67b7542122c.png)
Joined: 06/22/2005 14:51:37
Messages: 703
Location: Superior, CO, USA
Online
|
Would it be possible to post your DDL - the descriptions of your tables? I've used this on MS/SQL and haven't seen this.
Also, can you run jisql with the -driverinfo command line argument? I'd like to be able to test with the same versions that you're using.
Thanks for reporting this!
|
Thanks for using the forums at hotjoe.com |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12/15/2005 08:35:02
|
leono
Newbie
Joined: 11/07/2005 13:23:53
Messages: 2
Offline
|
DDL:
create table tblLenTest ( mycol varchar (50))
GO
insert into tblLenTest(mycol) values('This is a string which is longer than 24 chars')
GO
Then, executing:
java -classpath /Users/leon/Desktop/Download/jisql/lib/jisql.jar:/Users/leon/cvs/_shared/_Java/mssql/mssqlserver.jar:/Users/leon/cvs/_shared/_Java/mssql/msbase.jar:/Users/leon/cvs/_shared/_Java/mssql/msutil.jar com.xigole.util.sql.Jisql -driver mssql -user XXX -password XXX -c \; -cstring jdbc:microsoft:sqlserver://XXX:1433;databaseName=master
and entering:
1 > select * from tblLenTest;
results in:
mycol |
-------------------------|
This is a string which i |
Driver Info:
driver.getMajorVersion() is 2
driver.getMinorVersion() is 2
driver is JDBC compliant
driver property named "netAddress"
description: "Workstation's network interface card address"
required parameter?: "false"
current value: "000000000000"
driver property named "portNumber"
description: "Port number"
required parameter?: "false"
current value: "1433"
driver property named "hostProcess"
description: "Workstation process ID number"
required parameter?: "false"
current value: "0"
driver property named "user"
description: "Login ID"
required parameter?: "true"
current value: ""
driver property named "sendStringParametersAsUnicode"
choices:
choice 0: "false"
choice 1: "true"
description: "Send UCS2 String Parameters As Unicode"
required parameter?: "false"
current value: "true"
driver property named "databaseName"
description: "Database name"
required parameter?: "false"
current value: ""
driver property named "programName"
description: "Name of the application program"
required parameter?: "false"
current value: ""
driver property named "serverName"
description: "Server name"
required parameter?: "true"
current value: ""
driver property named "selectMethod"
choices:
choice 0: "cursor"
choice 1: "direct"
description: "Select Method"
required parameter?: "false"
current value: "direct"
driver property named "WSID"
description: "Workstation's ID"
required parameter?: "false"
current value: ""
driver property named "password"
description: "Login Password"
required parameter?: "true"
current value: ""
metaData.getDatabaseProductName(): "Microsoft SQL Server"
metaData.getDatabaseProductVersion(): "Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 1)
"
metaData.getDriverName(): "SQLServer"
metaData.getDriverVersion(): "2.2.0029"
This message was edited 1 time. Last update was at 12/15/2005 08:38:07
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12/15/2005 08:38:53
|
stdunbar
Newbie
![[Avatar]](/images/avatar/a87ff679a2f3e71d9181a67b7542122c.png)
Joined: 06/22/2005 14:51:37
Messages: 703
Location: Superior, CO, USA
Online
|
That is just what I needed - let me take a look. Thanks for the information.
|
Thanks for using the forums at hotjoe.com |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12/15/2005 14:05:00
|
akerr
Newbie
Joined: 12/15/2005 14:03:56
Messages: 1
Offline
|
For what it's worth, we have the same problem using the jTDS JDBC driver for SQL Server.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12/15/2005 14:52:26
|
stdunbar
Newbie
![[Avatar]](/images/avatar/a87ff679a2f3e71d9181a67b7542122c.png)
Joined: 06/22/2005 14:51:37
Messages: 703
Location: Superior, CO, USA
Online
|
A new version of Jisql is now available that fixes this bug. More information is available at the Jisql home page but basically I've flipped the default behavior from always truncating columns to optionally truncating columns. Please let me know if you have any problems with this version.
|
Thanks for using the forums at hotjoe.com |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12/16/2005 12:19:33
|
Anonymous
|
Perfect, this fixes the problem for us nicely. Thanks for the patch.
|
|
|
 |
|
|