Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

64bit ODBC Execute Error 22001: String data, right truncation

267 views
Skip to first unread message

KimTrang

unread,
May 24, 2010, 5:41:01 PM5/24/10
to
We're porting our unicode application from 32bit to 64bit. It worked on
32bit-app and 32bit-odbc, but with the 64bit-app and 64bit-odbc, we got the
error at execute:
[22001] [Microsoft][ODBC SQL Server Driver]String data, right truncation (0)

From the ODBC traces (see [1] and [2] below), I notice in the
SQLBindParameter, the values are not correct in parameters: ColumnSize,
BufferLength, and StrLen_or_IndPtr

[1] OD Application 32bit - ODBC 32bit =

arssockd noser 13a8-1ae0 ENTER SQLBindParameter
HSTMT 003B92F8
UWORD 1
SWORD 1 <SQL_PARAM_INPUT>
SWORD -8 <SQL_C_WCHAR>
SWORD -9 <SQL_WVARCHAR>
SQLULEN 60
SWORD 0
PTR 0x02B54298
SQLLEN 60
SQLLEN * 0x00353EB8

arssockd noser 13a8-1ae0 ENTER SQLBindParameter
HSTMT 003B92F8
UWORD 2
SWORD 1 <SQL_PARAM_INPUT>
SWORD 4 <SQL_C_LONG>
SWORD 4 <SQL_INTEGER>
SQLULEN 0
SWORD 0
PTR 0x00266FA0
SQLLEN 0
SQLLEN * 0x00000000

arssockd noser 13a8-1ae0 ENTER SQLExecDirectW
HSTMT 003B92F8
WCHAR * 0x00255F54 [ -3] <Invalid string length!>
SDWORD -3

[2] OD Application 64bit - ODBC 64bit =

arssockd noser 4ac-1038 ENTER SQLBindParameter
HSTMT 00000000003EB4C0
UWORD 1
SWORD 1 <SQL_PARAM_INPUT>
SWORD -8 <SQL_C_WCHAR>
SWORD -9 <SQL_WVARCHAR>
SQLULEN SQLULEN
SWORD 0
PTR 0x00000000002A65C0
SQLLEN SQLLEN
SQLLEN * SQLLEN *

arssockd noser 4ac-1038 ENTER SQLBindParameter
HSTMT 00000000003EB4C0
UWORD 2
SWORD 1 <SQL_PARAM_INPUT>
SWORD 4 <SQL_C_LONG>
SWORD 4 <SQL_INTEGER>
SQLULEN SQLULEN
SWORD 0
PTR 0x0000000000204CC8
SQLLEN SQLLEN
SQLLEN * SQLLEN *

arssockd noser 4ac-1038 ENTER SQLExecDirectW
HSTMT 00000000003EB4C0
WCHAR * 0x0000000000206690 [ -3] <Invalid string length!>
SDWORD -3
arssockd noser 4ac-1038 EXIT SQLExecDirectW with return code -1 (SQL_ERROR)
HSTMT 00000000003EB4C0
WCHAR * 0x0000000000206690 [ -3] <Invalid string length!>
SDWORD -3

DIAG [22001] [Microsoft][ODBC SQL Server Driver]String data, right
truncation (0)

Rani

unread,
Feb 17, 2014, 7:17:00 AM2/17/14
to
Hi,

Please let me know if anyone is able to resolve this issue.

Thanks

sg.ken...@gmail.com

unread,
Jun 20, 2014, 4:52:27 AM6/20/14
to
Any Update?

wang....@gmail.com

unread,
Aug 10, 2017, 11:01:32 PM8/10/17
to
Have you got solution for this issue, kindly share if you have :)
0 new messages