Skip to Content.
Sympa Menu

freetds - Re: [freetds] Status of UTF-8 support in 0.83 dev

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Sebastien FLAESCH <sf AT 4js.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Status of UTF-8 support in 0.83 dev
  • Date: Wed, 13 Aug 2008 11:58:31 +0200

Thank you James for looking at this!

UTF-8 support is critical for one of of customers in Asia...

I have identified a first issue: I must of course use N'xxx' string
constants when inserting UNICODE/UTF-8 data in the database.
In previous sample program, the string constants where identified as
non-Unicode strings in the current database locale. Sorry...

I have added a SELECT to fetch inserted rows, and it seems to be fine
so far. I have checked the values in the database with SQL Server's
query tool and the characters are correct.

Still the insert statement using UTF-8 data fails with:

Error -1 at: SQLExecute 1.2 StmtH
Diagnostic info:
SQL State: 42000
SQL code : 8005
Message : [FreeTDS][SQL Server]The incoming tabular data stream
(TDS) remote procedure call (RPC) protocol stream is
incorrect. Parameter 4: The parameter name is invalid.


Note that the first insert with latin characters "abcéÓÎ" / "abcÛÊé"
(2 bytes long) works, it's the second insert using Asian characters
(3 bytes long)...


FYI I have rebuild freetds with iconv 1.12 now:

[root@fox ~]# ldd -r /opt3/dbs/tds/0.83/lib/libtdsodbc.so
libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x00111000)
librt.so.1 => /lib/tls/librt.so.1 (0x00a7b000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00957000)
libc.so.6 => /lib/tls/libc.so.6 (0x001ed000)
/lib/ld-linux.so.2 (0x00739000)

Thanks,
Seb


James K. Lowden wrote:
Sebastien FLAESCH wrote:
Log shows now:

log.c:190:Starting log file for FreeTDS 0.83.dev.20080812
on 2008-08-12 18:11:48 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "UTF-8" character
set iconv.c:516:tds_iconv_info_init: converting "UTF-8"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"

Hi Sebastien,
I modified the log messages from iconv.c to make them clearer. HTH.
But still, I get:


Error -1 at: SQLExecute 1.2 StmtH
Diagnostic info:
SQL State: 42000
SQL code : 8005
Message : [FreeTDS][SQL Server]The incoming tabular data stream
(TDS) remote procedure call (RPC) protocol stream is incorrect.
Parameter 4: The parameter name is invalid.

This happens because of these errors in the log:

query.c:1326:tds_put_data_info putting status query.c:1420:tds_put_data: colsize = 9
query.c:1449:tds_put_data: not null param varint_size = 2
util.c:334:tdserror(0x98cb050, 0x98cc3d8, 2402, 0)
odbc.c:2106:msgno 2402 20003
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
query.c:1326:tds_put_data_info putting status query.c:1420:tds_put_data: colsize = 9
query.c:1449:tds_put_data: not null param varint_size = 2
util.c:334:tdserror(0x98cb050, 0x98cc3d8, 2402, 0)
odbc.c:2106:msgno 2402 20003
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet

The resulting sp_execute call is incorrectly formed, and the server
complains.
2402 is TDSEICONVO and indicates an invalid multibyte input sequence was
encountered while sending data to the server.
I'm too tired to debug it further. I would guess the parameter data are
assumed to be in ISO-8859-1, not in the client's encoding.
Regards,
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


/* Test UTF-8 character set
* Author: Sebastien FLAESCH
*
* The ODBC config parameter ClientCharset must be set:
* ClientCharset = UTF8
*/

static const char * g_dbname = "freetds_msvtest1_cobra_utf8";
static const char * g_usernm = "msvuser";
static const char * g_passwd = "fourjs";

#ifdef _WIN32
#include <WINDOWS.H>
#endif
#include <stdio.h>
#include <sql.h>
#include <sqlext.h>

#define CHECK_RCODE(t,h,m) \
if ( rcode != SQL_NO_DATA \
&& rcode != SQL_SUCCESS \
&& rcode != SQL_SUCCESS_WITH_INFO \
&& rcode != SQL_NEED_DATA ) { \
fprintf(stderr,"Error %d at: %s\n",rcode,m); \
getErrorInfo(t,h); \
exit(1); \
}

static int v_key;
static SQLINTEGER v_ind_key;

static char v_char[41]; /* Can hold 10 UTF-8 chars */
static SQLINTEGER v_ind_char;

static char v_varchar[41]; /* Can hold 10 UTF-8 chars */
static SQLINTEGER v_ind_varchar;

static void getErrorInfo(SQLSMALLINT sqlhdltype, SQLHANDLE sqlhandle)
{
SQLRETURN rcode = 0;
SQLCHAR sqlstate[SQL_SQLSTATE_SIZE + 1];
SQLINTEGER naterror = 0;
SQLCHAR msgtext[SQL_MAX_MESSAGE_LENGTH + 1];
SQLSMALLINT msgtextl = 0;
int ifxerror = 0;
rcode = SQLGetDiagRec((SQLSMALLINT) sqlhdltype,
(SQLHANDLE) sqlhandle,
(SQLSMALLINT) 1,
(SQLCHAR *) sqlstate,
(SQLINTEGER *) & naterror,
(SQLCHAR *) msgtext,
(SQLSMALLINT) sizeof(msgtext),
(SQLSMALLINT *) & msgtextl);
fprintf(stderr, "Diagnostic info:\n");
fprintf(stderr, " SQL State: %s\n", (char *) sqlstate);
fprintf(stderr, " SQL code : %d\n", (int) naterror);
fprintf(stderr, " Message : %s\n", (char *) msgtext);
}

static void doFetch(SQLHSTMT m_hstmt, int dir, int pos)
{
SQLRETURN rcode = SQLFetchScroll(m_hstmt,dir,pos);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt,"SQLFetchScroll");
if (rcode != SQL_NO_DATA)
fprintf(stdout,">> fetch : %d [%s] [%s]\n",
v_ind_key ? v_key : -1,
v_ind_char ? v_char : "",
v_ind_varchar ? v_varchar : "");
else
fprintf(stdout,">> fetch : no data found\n");
}

main(int argc,char **argv)
{
SQLRETURN rcode;
SQLHENV m_henv;
SQLHDBC m_hdbc;
SQLHSTMT m_hstmt1;
int i,j;
const char * dbname;
const char * usernm;
const char * passwd;

if (argc == 4) {
dbname = argv[1];
usernm = argv[2];
passwd = argv[3];
} else {
dbname = g_dbname;
usernm = g_usernm;
passwd = g_passwd;
}

m_henv = NULL;
rcode = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &m_henv);
CHECK_RCODE(SQL_HANDLE_ENV,NULL,"SQLAllocHandle EnvH");

rcode = SQLSetEnvAttr(m_henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)
SQL_OV_ODBC3, SQL_IS_UINTEGER);
CHECK_RCODE(SQL_HANDLE_ENV,m_henv,"ODBC V3");

m_hdbc = NULL;
rcode = SQLAllocHandle(SQL_HANDLE_DBC, (SQLHANDLE) m_henv, (SQLHANDLE *)
&m_hdbc);
CHECK_RCODE(SQL_HANDLE_ENV,m_henv,"SQLAllocHandle DbcH");

rcode = SQLConnect((SQLHANDLE) m_hdbc,
(SQLCHAR *) dbname,
(SQLINTEGER) SQL_NTS,
(SQLCHAR *) usernm,
(SQLINTEGER) SQL_NTS,
(SQLCHAR *) passwd,
(SQLINTEGER) SQL_NTS);
CHECK_RCODE(SQL_HANDLE_DBC,m_hdbc,"SQLConnect");

rcode = SQLSetConnectAttr(m_hdbc,
SQL_ATTR_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_ON,
SQL_IS_UINTEGER);
CHECK_RCODE(SQL_HANDLE_ENV,m_henv,"SQLSetConnectAttr(autocommit)");

m_hstmt1 = NULL;
rcode = SQLAllocHandle(SQL_HANDLE_STMT, m_hdbc, &m_hstmt1);
CHECK_RCODE(SQL_HANDLE_DBC,m_hdbc,"SQLAllocHandle StmtH 1");

rcode = SQLExecDirect(m_hstmt1, (SQLCHAR *) "drop table mytab王鴻",
SQL_NTS);
rcode = SQLExecDirect(m_hstmt1, (SQLCHAR *) "create table mytab王鴻 (k
int, c nchar(10), vc nvarchar(10))", SQL_NTS);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLExecDirect 1.1");

rcode = SQLExecDirect(m_hstmt1, (SQLCHAR *) "insert into mytab王鴻
values (1,'aaa','aaa')", SQL_NTS);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLExecDirect 1.2");
rcode = SQLExecDirect(m_hstmt1, (SQLCHAR *) "insert into mytab王鴻
values (2,N'abcéáô',N'abcéîô')", SQL_NTS);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLExecDirect 1.3");
rcode = SQLExecDirect(m_hstmt1, (SQLCHAR *) "insert into mytab王鴻
values (3,N'abc王鴻',N'abc王鴻傑王鴻傑')", SQL_NTS);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLExecDirect 1.4");

/* Fetch rows from the server */
rcode = SQLPrepare(m_hstmt1, (SQLCHAR *) "select * from mytab王鴻 order
by k", SQL_NTS);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLPrepare select");

rcode = SQLBindCol(m_hstmt1, 1, SQL_C_LONG, &v_key, 0, &v_ind_key);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLBindCol 1.1");

rcode = SQLBindCol(m_hstmt1, 2, SQL_C_CHAR, v_char, sizeof(v_char),
&v_ind_char);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLBindCol 1.2");

rcode = SQLBindCol(m_hstmt1, 3, SQL_C_CHAR, v_varchar, sizeof(v_varchar),
&v_ind_varchar);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLBindCol 1.3");

rcode = SQLExecute(m_hstmt1);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLExecute StmtH select");

doFetch(m_hstmt1, SQL_FETCH_NEXT, 0);
doFetch(m_hstmt1, SQL_FETCH_NEXT, 0);
doFetch(m_hstmt1, SQL_FETCH_NEXT, 0);

rcode = SQLCloseCursor(m_hstmt1);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLCloseCursor StmtH 1");

/* Now insert with SQL parameters */
rcode = SQLPrepare(m_hstmt1, (SQLCHAR *) "insert into mytab王鴻 values
(?,?,?)", SQL_NTS);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLPrepare insert");

SQLBindParameter(m_hstmt1, 1, SQL_PARAM_INPUT,
SQL_C_LONG,
SQL_INTEGER, 0, 0, &v_key, 0,
&v_ind_key);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLBindParameter 1");

SQLBindParameter(m_hstmt1, 2, SQL_PARAM_INPUT,
SQL_C_CHAR,
SQL_CHAR, 40, 0, v_char, 0,
&v_ind_char);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLBindParameter 2");

SQLBindParameter(m_hstmt1, 3, SQL_PARAM_INPUT,
SQL_C_CHAR,
SQL_VARCHAR, 40, 0, v_varchar, 0,
&v_ind_varchar);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLBindParameter 3");

strcpy(v_char, "abcéÓÎ" );
v_ind_char = strlen(v_char);
strcpy(v_varchar, "abcÛÊé" );
v_ind_varchar = strlen(v_varchar);
rcode = SQLExecute(m_hstmt1);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLExecute 1.1 StmtH");

strcpy(v_char, "abc王鴻" );
v_ind_char = strlen(v_char);
strcpy(v_varchar, "abc王鴻傑王鴻傑" );
v_ind_varchar = strlen(v_varchar);
rcode = SQLExecute(m_hstmt1);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLExecute 1.2 StmtH");

rcode = SQLFreeHandle(SQL_HANDLE_STMT, (SQLHANDLE) m_hstmt1);
CHECK_RCODE(SQL_HANDLE_STMT,m_hstmt1,"SQLFreeHandle StmtH 1");

rcode = SQLDisconnect(m_hdbc);
CHECK_RCODE(SQL_HANDLE_DBC,m_hdbc,"SQLDisconnect");

rcode = SQLFreeHandle(SQL_HANDLE_DBC, (SQLHANDLE) m_hdbc);
CHECK_RCODE(SQL_HANDLE_DBC,m_hdbc,"SQLFreeHandle DbcH");

rcode = SQLFreeHandle(SQL_HANDLE_ENV, (SQLHANDLE) m_henv);
CHECK_RCODE(SQL_HANDLE_ENV,m_henv,"SQLFreeHandle EnvH");

}

log.c:190:Starting log file for FreeTDS 0.83.dev.20080812
	on 2008-08-13 11:56:54 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "UTF-8" character set
iconv.c:516:tds_iconv_info_init: converting "UTF-8"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:204:Connecting to 10.0.0.115 port 1680 (TDS version 8.0)
net.c:258:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:296:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:734:quietly sending TDS 7+ login packet
token.c:312:tds_process_login_tokens()
net.c:662:Received packet
0000 04 01 01 89 00 36 01 00-e3 1f 00 01 08 6d 00 73 |.....6.. .....m.s|
0010 00 76 00 74 00 65 00 73-00 74 00 31 00 06 6d 00 |.v.t.e.s .t.1..m.|
0020 61 00 73 00 74 00 65 00-72 00 ab 6e 00 45 16 00 |a.s.t.e. r..n.E..|
0030 00 02 00 27 00 43 00 68-00 61 00 6e 00 67 00 65 |...'.C.h .a.n.g.e|
0040 00 64 00 20 00 64 00 61-00 74 00 61 00 62 00 61 |.d. .d.a .t.a.b.a|
0050 00 73 00 65 00 20 00 63-00 6f 00 6e 00 74 00 65 |.s.e. .c .o.n.t.e|
0060 00 78 00 74 00 20 00 74-00 6f 00 20 00 27 00 6d |.x.t. .t .o. .'.m|
0070 00 73 00 76 00 74 00 65-00 73 00 74 00 31 00 27 |.s.v.t.e .s.t.1.'|
0080 00 2e 00 0a 43 00 4f 00-42 00 52 00 41 00 5c 00 |....C.O. B.R.A.\.|
0090 4d 00 53 00 56 00 31 00-00 01 00 e3 08 00 07 05 |M.S.V.1. ........|
00a0 09 04 c0 00 33 00 e3 17-00 02 0a 75 00 73 00 5f |....3... ...u.s._|
00b0 00 65 00 6e 00 67 00 6c-00 69 00 73 00 68 00 00 |.e.n.g.l .i.s.h..|
00c0 ab 6e 00 47 16 00 00 01-00 27 00 43 00 68 00 61 |.n.G.... .'.C.h.a|
00d0 00 6e 00 67 00 65 00 64-00 20 00 6c 00 61 00 6e |.n.g.e.d . .l.a.n|
00e0 00 67 00 75 00 61 00 67-00 65 00 20 00 73 00 65 |.g.u.a.g .e. .s.e|
00f0 00 74 00 74 00 69 00 6e-00 67 00 20 00 74 00 6f |.t.t.i.n .g. .t.o|
0100 00 20 00 75 00 73 00 5f-00 65 00 6e 00 67 00 6c |. .u.s._ .e.n.g.l|
0110 00 69 00 73 00 68 00 2e-00 0a 43 00 4f 00 42 00 |.i.s.h.. ..C.O.B.|
0120 52 00 41 00 5c 00 4d 00-53 00 56 00 31 00 00 01 |R.A.\.M. S.V.1...|
0130 00 ad 36 00 01 71 00 00-01 16 4d 00 69 00 63 00 |..6..q.. ..M.i.c.|
0140 72 00 6f 00 73 00 6f 00-66 00 74 00 20 00 53 00 |r.o.s.o. f.t. .S.|
0150 51 00 4c 00 20 00 53 00-65 00 72 00 76 00 65 00 |Q.L. .S. e.r.v.e.|
0160 72 00 00 00 00 00 09 00-05 77 e3 13 00 04 04 34 |r....... .w.....4|
0170 00 30 00 39 00 36 00 04-34 00 30 00 39 00 36 00 |.0.9.6.. 4.0.9.6.|
0180 fd 00 00 00 00 00 00 00-00                      |........ .|

token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:316:looking for login token, got  ab(INFO)
token.c:108:tds_process_default_tokens() marker is ab(INFO)
token.c:2523:tds_process_msg() reading message from server
token.c:2596:tds_process_msg() calling client msg handler
odbc.c:2106:msgno 5701 20003
token.c:2609:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2354:tds_process_env_chg(): 5 bytes of collation data received
token.c:2355:tds->collation was
0000 00 00 00 00 00         -                        |.....|

iconv.c:985:setting server single-byte charset to "CP1252"
iconv.c:516:tds_iconv_info_init: converting "UTF-8"->"CP1252"
token.c:2365:tds->collation now
0000 09 04 c0 00 33         -                        |....3|

token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:316:looking for login token, got  ab(INFO)
token.c:108:tds_process_default_tokens() marker is ab(INFO)
token.c:2523:tds_process_msg() reading message from server
token.c:2596:tds_process_msg() calling client msg handler
odbc.c:2106:msgno 5703 20003
token.c:2609:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got  ad(LOGINACK)
token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2412:changing block size from 4096 to 4096
token.c:316:looking for login token, got  fd(DONE)
token.c:108:tds_process_default_tokens() marker is fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
token.c:2305:                rows_affected = 0
token.c:393:leaving tds_process_login_tokens() returning 1
odbc.c:6123:SQLSetConnectAttr(0x8d5c208, 102, 0x1, -5)
odbc.c:6038:_SQLSetConnectAttr(0x8d5c208, 102, 0x1, -5)
odbc.c:235:change_autocommit: executing SET IMPLICIT_TRANSACTIONS OFF
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 29 bytes of "SET IMPLICIT_TRANSACTIONS OFF"
write.c:164:tds_put_string wrote 58 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 01 01 00 42 00 00 01 00-53 00 45 00 54 00 20 00 |...B.... S.E.T. .|
0010 49 00 4d 00 50 00 4c 00-49 00 43 00 49 00 54 00 |I.M.P.L. I.C.I.T.|
0020 5f 00 54 00 52 00 41 00-4e 00 53 00 41 00 43 00 |_.T.R.A. N.S.A.C.|
0030 54 00 49 00 4f 00 4e 00-53 00 20 00 4f 00 46 00 |T.I.O.N. S. .O.F.|
0040 46 00                  -                        |F.|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07c4, 0xbfff07c8, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 11 00 36 01 00-fd 00 00 ba 00 00 00 00 |.....6.. ........|
0010 00                     -                        |.|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07c4, 0xbfff07c8, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:1314:SQLAllocHandle(3, 0x8d5c208, 0xbfff0908)
odbc.c:1473:_SQLAllocStmt(0x8d5c208, 0xbfff0908)
odbc.c:3286:SQLExecDirect(0x8d5f228, 0x804990c, -3)
prepare_query.c:202:parsing 0 parameters
odbc.c:3043:_SQLExecute(0x8d5f228)
odbc.c:3048:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 22 bytes of "drop table mytab王鴻"
write.c:164:tds_put_string wrote 36 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 01 01 00 2c 00 00 01 00-64 00 72 00 6f 00 70 00 |...,.... d.r.o.p.|
0010 20 00 74 00 61 00 62 00-6c 00 65 00 20 00 6d 00 | .t.a.b. l.e. .m.|
0020 79 00 74 00 61 00 62 00-8b 73 3b 9d             |y.t.a.b. .s;.|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 11 00 36 01 00-fd 00 00 c7 00 00 00 00 |.....6.. ........|
0010 00                     -                        |.|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3400:odbc_process_tokens: processed TDS_DONE_RESULT
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x26914)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 2
odbc.c:3357:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4046
odbc.c:3286:SQLExecDirect(0x8d5f228, 0x8049924, -3)
prepare_query.c:202:parsing 0 parameters
odbc.c:3043:_SQLExecute(0x8d5f228)
odbc.c:3048:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 62 bytes of "create table mytab王鴻 (k int, c nchar(10), vc nvarchar(10))"
write.c:164:tds_put_string wrote 116 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 01 01 00 7c 00 00 01 00-63 00 72 00 65 00 61 00 |...|.... c.r.e.a.|
0010 74 00 65 00 20 00 74 00-61 00 62 00 6c 00 65 00 |t.e. .t. a.b.l.e.|
0020 20 00 6d 00 79 00 74 00-61 00 62 00 8b 73 3b 9d | .m.y.t. a.b..s;.|
0030 20 00 28 00 6b 00 20 00-69 00 6e 00 74 00 2c 00 | .(.k. . i.n.t.,.|
0040 20 00 63 00 20 00 6e 00-63 00 68 00 61 00 72 00 | .c. .n. c.h.a.r.|
0050 28 00 31 00 30 00 29 00-2c 00 20 00 76 00 63 00 |(.1.0.). ,. .v.c.|
0060 20 00 6e 00 76 00 61 00-72 00 63 00 68 00 61 00 | .n.v.a. r.c.h.a.|
0070 72 00 28 00 31 00 30 00-29 00 29 00             |r.(.1.0. ).).|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 11 00 36 01 00-fd 00 00 c6 00 00 00 00 |.....6.. ........|
0010 00                     -                        |.|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3400:odbc_process_tokens: processed TDS_DONE_RESULT
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x26914)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 2
odbc.c:3357:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4046
odbc.c:3286:SQLExecDirect(0x8d5f228, 0x8049978, -3)
prepare_query.c:202:parsing 0 parameters
odbc.c:3043:_SQLExecute(0x8d5f228)
odbc.c:3048:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 46 bytes of "insert into mytab王鴻 values (1,'aaa','aaa')"
write.c:164:tds_put_string wrote 84 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 01 01 00 5c 00 00 01 00-69 00 6e 00 73 00 65 00 |...\.... i.n.s.e.|
0010 72 00 74 00 20 00 69 00-6e 00 74 00 6f 00 20 00 |r.t. .i. n.t.o. .|
0020 6d 00 79 00 74 00 61 00-62 00 8b 73 3b 9d 20 00 |m.y.t.a. b..s;. .|
0030 76 00 61 00 6c 00 75 00-65 00 73 00 20 00 28 00 |v.a.l.u. e.s. .(.|
0040 31 00 2c 00 27 00 61 00-61 00 61 00 27 00 2c 00 |1.,.'.a. a.a.'.,.|
0050 27 00 61 00 61 00 61 00-27 00 29 00             |'.a.a.a. '.).|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 11 00 36 01 00-fd 10 00 c3 00 01 00 00 |.....6.. ........|
0010 00                     -                        |.|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 1
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4052, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3397:odbc_process_tokens: row_count=1
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4052
odbc.c:3286:SQLExecDirect(0x8d5f228, 0x80499bc, -3)
prepare_query.c:202:parsing 0 parameters
odbc.c:3043:_SQLExecute(0x8d5f228)
odbc.c:3048:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 60 bytes of "insert into mytab王鴻 values (2,N'abcéáô',N'abcéîô')"
write.c:164:tds_put_string wrote 100 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 01 01 00 6c 00 00 01 00-69 00 6e 00 73 00 65 00 |...l.... i.n.s.e.|
0010 72 00 74 00 20 00 69 00-6e 00 74 00 6f 00 20 00 |r.t. .i. n.t.o. .|
0020 6d 00 79 00 74 00 61 00-62 00 8b 73 3b 9d 20 00 |m.y.t.a. b..s;. .|
0030 76 00 61 00 6c 00 75 00-65 00 73 00 20 00 28 00 |v.a.l.u. e.s. .(.|
0040 32 00 2c 00 4e 00 27 00-61 00 62 00 63 00 e9 00 |2.,.N.'. a.b.c...|
0050 e1 00 f4 00 27 00 2c 00-4e 00 27 00 61 00 62 00 |....'.,. N.'.a.b.|
0060 63 00 e9 00 ee 00 f4 00-27 00 29 00             |c....... '.).|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 11 00 36 01 00-fd 10 00 c3 00 01 00 00 |.....6.. ........|
0010 00                     -                        |.|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 1
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4052, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3397:odbc_process_tokens: row_count=1
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4052
odbc.c:3286:SQLExecDirect(0x8d5f228, 0x8049a0c, -3)
prepare_query.c:202:parsing 0 parameters
odbc.c:3043:_SQLExecute(0x8d5f228)
odbc.c:3048:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 72 bytes of "insert into mytab王鴻 values (3,N'abc王鴻',N'abc王鴻傑王鴻傑')"
write.c:164:tds_put_string wrote 104 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 01 01 00 70 00 00 01 00-69 00 6e 00 73 00 65 00 |...p.... i.n.s.e.|
0010 72 00 74 00 20 00 69 00-6e 00 74 00 6f 00 20 00 |r.t. .i. n.t.o. .|
0020 6d 00 79 00 74 00 61 00-62 00 8b 73 3b 9d 20 00 |m.y.t.a. b..s;. .|
0030 76 00 61 00 6c 00 75 00-65 00 73 00 20 00 28 00 |v.a.l.u. e.s. .(.|
0040 33 00 2c 00 4e 00 27 00-61 00 62 00 63 00 8b 73 |3.,.N.'. a.b.c..s|
0050 3b 9d 27 00 2c 00 4e 00-27 00 61 00 62 00 63 00 |;.'.,.N. '.a.b.c.|
0060 8b 73 3b 9d 91 50 8b 73-3b 9d 91 50 27 00 29 00 |.s;..P.s ;..P'.).|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 11 00 36 01 00-fd 10 00 c3 00 01 00 00 |.....6.. ........|
0010 00                     -                        |.|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 1
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4052, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3397:odbc_process_tokens: row_count=1
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4052
odbc.c:4239:SQLPrepare(0x8d5f228, select * from mytab王鴻 order by k, -3)
prepare_query.c:202:parsing 0 parameters
odbc.c:4303:Creating prepared statement
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 03 01 00 7c 00 00 01 00-ff ff 0b 00 00 00 00 01 |...|.... ........|
0010 26 04 00 00 00 63 00 00-00 00 09 04 c0 00 33 ff |&....c.. ......3.|
0020 ff ff ff 00 00 63 40 00-00 00 09 04 c0 00 33 40 |.....c@. ......3@|
0030 00 00 00 73 00 65 00 6c-00 65 00 63 00 74 00 20 |...s.e.l .e.c.t. |
0040 00 2a 00 20 00 66 00 72-00 6f 00 6d 00 20 00 6d |.*. .f.r .o.m. .m|
0050 00 79 00 74 00 61 00 62-00 8b 73 3b 9d 20 00 6f |.y.t.a.b ..s;. .o|
0060 00 72 00 64 00 65 00 72-00 20 00 62 00 79 00 20 |.r.d.e.r . .b.y. |
0070 00 6b 00 00 00 26 04 04-01 00 00 00             |.k...&.. ....|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff08b4, 0xbfff08b8, 0x104)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 60 00 36 01 00-81 03 00 00 00 09 00 26 |...`.6.. .......&|
0010 04 01 6b 00 00 00 0b 00-ef 14 00 09 04 c0 00 33 |..k..... .......3|
0020 01 63 00 00 00 0b 00 e7-14 00 09 04 c0 00 33 02 |.c...... ......3.|
0030 76 00 63 00 a9 02 00 01-00 ff 11 00 c1 00 00 00 |v.c..... ........|
0040 00 00 79 00 00 00 00 ac-0d 00 00 01 00 00 00 00 |..y..... ........|
0050 26 04 04 01 00 00 00 fe-00 00 e0 00 00 00 00 00 |&....... ........|

token.c:510:processing result tokens.  marker is  81(TDS7_RESULT)
token.c:1526:processing TDS7 result metadata.
mem.c:563:tds_free_all_results()
token.c:1550:set current_results (3 columns) to tds->res_info
token.c:1561:setting up column 0
token.c:1496:tds7_get_data_info: 
	colname = k (1 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 4 (4 on server)
token.c:1561:setting up column 1
token.c:3374:adjust_character_column_size:
	Server charset: UCS-2LE
	Server column_size: 20
	Client charset: UTF-8
	Client column_size: 40
token.c:1496:tds7_get_data_info: 
	colname = c (1 bytes)
	type = 47 (char)
	server's type = 239 (x UCS-2 char)
	column_varint_size = 2
	column_size = 40 (20 on server)
token.c:1561:setting up column 2
token.c:3374:adjust_character_column_size:
	Server charset: UCS-2LE
	Server column_size: 20
	Client charset: UTF-8
	Client column_size: 40
token.c:1496:tds7_get_data_info: 
	colname = vc (2 bytes)
	type = 39 (varchar)
	server's type = 231 (x UCS-2 varchar)
	column_varint_size = 2
	column_size = 40 (20 on server)
util.c:162:Changed query state from READING to PENDING
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff08b4, 0xbfff08b8, 0x104)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  a9(ORDERBY)
token.c:108:tds_process_default_tokens() marker is a9(ORDERBY)
token.c:223:Eating ORDERBY token
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2274:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2305:                rows_affected = 0
token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:510:processing result tokens.  marker is  ac(PARAM)
token.c:567:processing parameters for sp 11
token.c:569:calling tds_process_param_result
token.c:1198:tds_process_param_result(0x8d5d3d8, 0xbfff084c)
token.c:1582:tds_get_data_info(0x8d5d3d8, 0x8d60278, 1) [for parameter]token.c:1645:processing result. type = 38(integer-null), varint_size 1
token.c:1666:processing result. column_size 4
token.c:1984:tds_get_data: type 38, varint size 1
token.c:2048:tds_get_data(): wire column size is 4 
log.c:481:type integer-null has value 1
token.c:573:1 hidden return parameters
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff08b4, 0xbfff08b8, 0x104)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:1589:SQLBindCol(0x8d5f228, 1, 4, 0x804ada0, 0, 0x804ada4)
odbc.c:1589:SQLBindCol(0x8d5f228, 2, 1, 0x804adc0, 41, 0x804adec)
odbc.c:1589:SQLBindCol(0x8d5f228, 3, 1, 0x804ae00, 41, 0x804ae2c)
odbc.c:3318:SQLExecute(0x8d5f228)
prepare_query.c:202:parsing 0 parameters
odbc.c:3043:_SQLExecute(0x8d5f228)
odbc.c:3048:_SQLExecute() starting with state 0
odbc.c:3156:End prepare, execute
query.c:1631:tds_submit_execute()
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 03 01 00 29 00 00 01 00-0a 00 73 00 70 00 5f 00 |...).... ..s.p._.|
0010 65 00 78 00 65 00 63 00-75 00 74 00 65 00 00 00 |e.x.e.c. u.t.e...|
0020 00 00 26 04 04 01 00 00-00                      |..&..... .|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 ce 00 36 01 00-81 03 00 00 00 09 00 26 |.....6.. .......&|
0010 04 01 6b 00 00 00 0b 00-ef 14 00 09 04 c0 00 33 |..k..... .......3|
0020 01 63 00 00 00 0b 00 e7-14 00 09 04 c0 00 33 02 |.c...... ......3.|
0030 76 00 63 00 a9 02 00 01-00 d1 04 01 00 00 00 14 |v.c..... ........|
0040 00 61 00 61 00 61 00 20-00 20 00 20 00 20 00 20 |.a.a.a.  . . . . |
0050 00 20 00 20 00 06 00 61-00 61 00 61 00 d1 04 02 |. . ...a .a.a....|
0060 00 00 00 14 00 61 00 62-00 63 00 e9 00 e1 00 f4 |.....a.b .c......|
0070 00 20 00 20 00 20 00 20-00 0c 00 61 00 62 00 63 |. . . .  ...a.b.c|
0080 00 e9 00 ee 00 f4 00 d1-04 03 00 00 00 14 00 61 |........ .......a|
0090 00 62 00 63 00 8b 73 3b-9d 20 00 20 00 20 00 20 |.b.c..s; . . . . |
00a0 00 20 00 12 00 61 00 62-00 63 00 8b 73 3b 9d 91 |. ...a.b .c..s;..|
00b0 50 8b 73 3b 9d 91 50 ff-11 00 c1 00 03 00 00 00 |P.s;..P. ........|
00c0 79 00 00 00 00 fe 00 00-e0 00 00 00 00 00       |y....... ......|

token.c:510:processing result tokens.  marker is  81(TDS7_RESULT)
token.c:1526:processing TDS7 result metadata.
mem.c:563:tds_free_all_results()
token.c:1550:set current_results (3 columns) to tds->res_info
token.c:1561:setting up column 0
token.c:1496:tds7_get_data_info: 
	colname = k (1 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 4 (4 on server)
token.c:1561:setting up column 1
token.c:3374:adjust_character_column_size:
	Server charset: UCS-2LE
	Server column_size: 20
	Client charset: UTF-8
	Client column_size: 40
token.c:1496:tds7_get_data_info: 
	colname = c (1 bytes)
	type = 47 (char)
	server's type = 239 (x UCS-2 char)
	column_varint_size = 2
	column_size = 40 (20 on server)
token.c:1561:setting up column 2
token.c:3374:adjust_character_column_size:
	Server charset: UCS-2LE
	Server column_size: 20
	Client charset: UTF-8
	Client column_size: 40
token.c:1496:tds7_get_data_info: 
	colname = vc (2 bytes)
	type = 39 (varchar)
	server's type = 231 (x UCS-2 varchar)
	column_varint_size = 2
	column_size = 40 (20 on server)
util.c:162:Changed query state from READING to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4049, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3427:odbc_process_tokens: returning result_type 4049
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4049
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  a9(ORDERBY)
token.c:108:tds_process_default_tokens() marker is a9(ORDERBY)
token.c:223:Eating ORDERBY token
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:621:tds_process_tokens::SET_RETURN stopping on current token
util.c:162:Changed query state from READING to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4040, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3427:odbc_process_tokens: returning result_type 4040
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4040
odbc.c:3341:SQLExecute returns SQL_SUCCESS
odbc.c:3776:SQLFetchScroll(0x8d5f228, 1, 0)
odbc.c:3487:_SQLFetch(0x8d5f228, 1, 0)
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07d0, 0xbfff07d4, 0x6508)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:2239:tds_process_row(): reading column 0 
token.c:1984:tds_get_data: type 38, varint size 1
token.c:2048:tds_get_data(): wire column size is 4 
token.c:2239:tds_process_row(): reading column 1 
token.c:1984:tds_get_data: type 47, varint size 2
token.c:2048:tds_get_data(): wire column size is 20 
token.c:2239:tds_process_row(): reading column 2 
token.c:1984:tds_get_data: type 39, varint size 2
token.c:2048:tds_get_data(): wire column size is 6 
util.c:162:Changed query state from READING to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4040, TDS_DONE_COUNT=10, TDS_DONE_ERROR=2
odbc.c:3427:odbc_process_tokens: returning result_type 4040
convert_tds2sql.c:62:convert_tds2sql: src is 56 dest = 4
convert_tds2sql.c:62:convert_tds2sql: src is 47 dest = 1
convert_tds2sql.c:131:convert_tds2sql: outputting character data destlen = 41 
convert_tds2sql.c:62:convert_tds2sql: src is 39 dest = 1
convert_tds2sql.c:131:convert_tds2sql: outputting character data destlen = 41 
odbc.c:3776:SQLFetchScroll(0x8d5f228, 1, 0)
odbc.c:3487:_SQLFetch(0x8d5f228, 1, 0)
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07d0, 0xbfff07d4, 0x6508)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:2239:tds_process_row(): reading column 0 
token.c:1984:tds_get_data: type 38, varint size 1
token.c:2048:tds_get_data(): wire column size is 4 
token.c:2239:tds_process_row(): reading column 1 
token.c:1984:tds_get_data: type 47, varint size 2
token.c:2048:tds_get_data(): wire column size is 20 
token.c:2239:tds_process_row(): reading column 2 
token.c:1984:tds_get_data: type 39, varint size 2
token.c:2048:tds_get_data(): wire column size is 12 
util.c:162:Changed query state from READING to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4040, TDS_DONE_COUNT=10, TDS_DONE_ERROR=2
odbc.c:3427:odbc_process_tokens: returning result_type 4040
convert_tds2sql.c:62:convert_tds2sql: src is 56 dest = 4
convert_tds2sql.c:62:convert_tds2sql: src is 47 dest = 1
convert_tds2sql.c:131:convert_tds2sql: outputting character data destlen = 41 
convert_tds2sql.c:62:convert_tds2sql: src is 39 dest = 1
convert_tds2sql.c:131:convert_tds2sql: outputting character data destlen = 41 
odbc.c:3776:SQLFetchScroll(0x8d5f228, 1, 0)
odbc.c:3487:_SQLFetch(0x8d5f228, 1, 0)
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07d0, 0xbfff07d4, 0x6508)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:2239:tds_process_row(): reading column 0 
token.c:1984:tds_get_data: type 38, varint size 1
token.c:2048:tds_get_data(): wire column size is 4 
token.c:2239:tds_process_row(): reading column 1 
token.c:1984:tds_get_data: type 47, varint size 2
token.c:2048:tds_get_data(): wire column size is 20 
token.c:2239:tds_process_row(): reading column 2 
token.c:1984:tds_get_data: type 39, varint size 2
token.c:2048:tds_get_data(): wire column size is 18 
util.c:162:Changed query state from READING to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4040, TDS_DONE_COUNT=10, TDS_DONE_ERROR=2
odbc.c:3427:odbc_process_tokens: returning result_type 4040
convert_tds2sql.c:62:convert_tds2sql: src is 56 dest = 4
convert_tds2sql.c:62:convert_tds2sql: src is 47 dest = 1
convert_tds2sql.c:131:convert_tds2sql: outputting character data destlen = 41 
convert_tds2sql.c:62:convert_tds2sql: src is 39 dest = 1
convert_tds2sql.c:131:convert_tds2sql: outputting character data destlen = 41 
odbc.c:3979:SQLCloseCursor(0x8d5f228)
odbc.c:3881:_SQLFreeStmt(0x8d5f228, 0, 0)
query.c:1935:tds_send_cancel: not in_cancel and not idle
query.c:1944:tds_send_cancel: sending cancel packet
net.c:768:Sending packet
0000 06 01 00 08 00 00 01 00-                        |........|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0858, (nil), 0x0)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2274:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2305:                rows_affected = 3
token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2305:                rows_affected = 0
net.c:662:Received packet
0000 04 01 00 11 00 36 01 00-fd 20 00 fd 00 00 00 00 |.....6.. . ......|
0010 00                     -                        |.|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 1
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
odbc.c:4239:SQLPrepare(0x8d5f228, insert into mytab王鴻 values (?,?,?), -3)
query.c:1769:tds_submit_unprepare() gl27e36000
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 03 01 00 17 00 00 01 00-ff ff 0f 00 00 00 00 00 |........ ........|
0010 26 04 04 01 00 00 00   -                        |&......|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0854, 0xbfff0858, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 16 00 36 01 00-79 00 00 00 00 fe 00 00 |.....6.. y.......|
0010 e0 00 00 00 00 00      -                        |......|

token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0854, 0xbfff0858, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
prepare_query.c:202:parsing 0 parameters
prepare_query.c:207:parse_prepared_query: logic_error: parameter out of bounds: 1 > 0 || 1 > 0
odbc.c:4303:Creating prepared statement
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 3 bytes of "@P1"
write.c:164:tds_put_string wrote 6 bytes
write.c:136:tds_put_string converting 3 bytes of "@P2"
write.c:164:tds_put_string wrote 6 bytes
write.c:136:tds_put_string converting 3 bytes of "@P3"
write.c:164:tds_put_string wrote 6 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 03 01 00 ea 00 00 01 00-ff ff 0b 00 00 00 00 01 |........ ........|
0010 26 04 00 00 00 63 5e 00-00 00 09 04 c0 00 33 5e |&....c^. ......3^|
0020 00 00 00 40 00 50 00 31-00 20 00 76 00 61 00 72 |...@.P.1 . .v.a.r|
0030 00 63 00 68 00 61 00 72-00 28 00 38 00 30 00 29 |.c.h.a.r .(.8.0.)|
0040 00 2c 00 40 00 50 00 32-00 20 00 76 00 61 00 72 |.,.@.P.2 . .v.a.r|
0050 00 63 00 68 00 61 00 72-00 28 00 38 00 30 00 29 |.c.h.a.r .(.8.0.)|
0060 00 2c 00 40 00 50 00 33-00 20 00 76 00 61 00 72 |.,.@.P.3 . .v.a.r|
0070 00 63 00 68 00 61 00 72-00 28 00 38 00 30 00 29 |.c.h.a.r .(.8.0.)|
0080 00 00 00 63 50 00 00 00-09 04 c0 00 33 50 00 00 |...cP... ....3P..|
0090 00 69 00 6e 00 73 00 65-00 72 00 74 00 20 00 69 |.i.n.s.e .r.t. .i|
00a0 00 6e 00 74 00 6f 00 20-00 6d 00 79 00 74 00 61 |.n.t.o.  .m.y.t.a|
00b0 00 62 00 8b 73 3b 9d 20-00 76 00 61 00 6c 00 75 |.b..s;.  .v.a.l.u|
00c0 00 65 00 73 00 20 00 28-00 40 00 50 00 31 00 2c |.e.s. .( .@.P.1.,|
00d0 00 40 00 50 00 32 00 2c-00 40 00 50 00 33 00 29 |.@.P.2., .@.P.3.)|
00e0 00 00 00 26 04 04 01 00-00 00                   |...&.... ..|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff08b4, 0xbfff08b8, 0x104)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 2f 00 36 01 00-ff 11 00 c3 00 00 00 00 |.../.6.. ........|
0010 00 79 00 00 00 00 ac 0d-00 00 01 00 00 00 00 26 |.y...... .......&|
0020 04 04 02 00 00 00 fe 00-00 e0 00 00 00 00 00    |........ .......|

token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2274:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2305:                rows_affected = 0
token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:510:processing result tokens.  marker is  ac(PARAM)
token.c:567:processing parameters for sp 11
token.c:569:calling tds_process_param_result
token.c:1198:tds_process_param_result(0x8d5d3d8, 0xbfff084c)
token.c:1582:tds_get_data_info(0x8d5d3d8, 0x8d5f338, 1) [for parameter]token.c:1645:processing result. type = 38(integer-null), varint_size 1
token.c:1666:processing result. column_size 4
token.c:1984:tds_get_data: type 38, varint size 1
token.c:2048:tds_get_data(): wire column size is 4 
log.c:481:type integer-null has value 2
token.c:573:1 hidden return parameters
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff08b4, 0xbfff08b8, 0x104)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:1294:SQLBindParameter(0x8d5f228, 1, 1, 4, 4, 0, 0, 0x804ada0, 0, 0x804ada4)
odbc.c:1195:_SQLBindParameter(0x8d5f228, 1, 1, 4, 4, 0, 0, 0x804ada0, 0, 0x804ada4)
odbc.c:1294:SQLBindParameter(0x8d5f228, 2, 1, 1, 1, 40, 0, 0x804adc0, 0, 0x804adec)
odbc.c:1195:_SQLBindParameter(0x8d5f228, 2, 1, 1, 1, 40, 0, 0x804adc0, 0, 0x804adec)
odbc.c:1294:SQLBindParameter(0x8d5f228, 3, 1, 1, 12, 40, 0, 0x804ae00, 0, 0x804ae2c)
odbc.c:1195:_SQLBindParameter(0x8d5f228, 3, 1, 1, 12, 40, 0, 0x804ae00, 0, 0x804ae2c)
odbc.c:3318:SQLExecute(0x8d5f228)
prepare_query.c:202:parsing 0 parameters
sql2tds.c:150:type=4
sql2tds.c:156:trace
sql2tds.c:150:type=1
sql2tds.c:156:trace
sql2tds.c:150:type=12
sql2tds.c:156:trace
odbc.c:3043:_SQLExecute(0x8d5f228)
odbc.c:3048:_SQLExecute() starting with state 0
query.c:1769:tds_submit_unprepare() gl27e39000
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 03 01 00 17 00 00 01 00-ff ff 0f 00 00 00 00 00 |........ ........|
0010 26 04 04 02 00 00 00   -                        |&......|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07d4, 0xbfff07d8, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 16 00 36 01 00-79 00 00 00 00 fe 00 00 |.....6.. y.......|
0010 e0 00 00 00 00 00      -                        |......|

token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07d4, 0xbfff07d8, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:3136:Creating prepared statement
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 3 bytes of "@P1"
write.c:164:tds_put_string wrote 6 bytes
write.c:136:tds_put_string converting 3 bytes of "@P2"
write.c:164:tds_put_string wrote 6 bytes
write.c:136:tds_put_string converting 3 bytes of "@P3"
write.c:164:tds_put_string wrote 6 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 03 01 00 d4 00 00 01 00-ff ff 0b 00 00 00 00 01 |........ ........|
0010 26 04 00 00 00 63 48 00-00 00 09 04 c0 00 33 48 |&....cH. ......3H|
0020 00 00 00 40 00 50 00 31-00 20 00 49 00 4e 00 54 |...@.P.1 . .I.N.T|
0030 00 2c 00 40 00 50 00 32-00 20 00 43 00 48 00 41 |.,.@.P.2 . .C.H.A|
0040 00 52 00 28 00 34 00 30-00 29 00 2c 00 40 00 50 |.R.(.4.0 .).,.@.P|
0050 00 33 00 20 00 56 00 41-00 52 00 43 00 48 00 41 |.3. .V.A .R.C.H.A|
0060 00 52 00 28 00 34 00 30-00 29 00 00 00 63 50 00 |.R.(.4.0 .)...cP.|
0070 00 00 09 04 c0 00 33 50-00 00 00 69 00 6e 00 73 |......3P ...i.n.s|
0080 00 65 00 72 00 74 00 20-00 69 00 6e 00 74 00 6f |.e.r.t.  .i.n.t.o|
0090 00 20 00 6d 00 79 00 74-00 61 00 62 00 8b 73 3b |. .m.y.t .a.b..s;|
00a0 9d 20 00 76 00 61 00 6c-00 75 00 65 00 73 00 20 |. .v.a.l .u.e.s. |
00b0 00 28 00 40 00 50 00 31-00 2c 00 40 00 50 00 32 |.(.@.P.1 .,.@.P.2|
00c0 00 2c 00 40 00 50 00 33-00 29 00 00 00 26 04 04 |.,.@.P.3 .)...&..|
00d0 01 00 00 00            -                        |....|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07f4, 0xbfff07f8, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 2f 00 36 01 00-ff 11 00 c3 00 00 00 00 |.../.6.. ........|
0010 00 79 00 00 00 00 ac 0d-00 00 01 00 00 00 00 26 |.y...... .......&|
0020 04 04 03 00 00 00 fe 00-00 e0 00 00 00 00 00    |........ .......|

token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2274:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2305:                rows_affected = 0
token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:510:processing result tokens.  marker is  ac(PARAM)
token.c:567:processing parameters for sp 11
token.c:569:calling tds_process_param_result
token.c:1198:tds_process_param_result(0x8d5d3d8, 0xbfff079c)
token.c:1582:tds_get_data_info(0x8d5d3d8, 0x8d608c8, 1) [for parameter]token.c:1645:processing result. type = 38(integer-null), varint_size 1
token.c:1666:processing result. column_size 4
token.c:1984:tds_get_data: type 38, varint size 1
token.c:2048:tds_get_data(): wire column size is 4 
log.c:481:type integer-null has value 3
token.c:573:1 hidden return parameters
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff07f4, 0xbfff07f8, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:3156:End prepare, execute
query.c:1631:tds_submit_execute()
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
query.c:1326:tds_put_data_info putting status 
query.c:1420:tds_put_data: colsize = 4
query.c:1449:tds_put_data: not null param varint_size = 1
query.c:1326:tds_put_data_info putting status 
query.c:1420:tds_put_data: colsize = 9
query.c:1449:tds_put_data: not null param varint_size = 2
query.c:1326:tds_put_data_info putting status 
query.c:1420:tds_put_data: colsize = 9
query.c:1449:tds_put_data: not null param varint_size = 2
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 03 01 00 56 00 00 01 00-0a 00 73 00 70 00 5f 00 |...V.... ..s.p._.|
0010 65 00 78 00 65 00 63 00-75 00 74 00 65 00 00 00 |e.x.e.c. u.t.e...|
0020 00 00 26 04 04 03 00 00-00 00 00 26 04 04 03 00 |..&..... ...&....|
0030 00 00 00 00 af 28 00 09-04 c0 00 33 06 00 61 62 |.....(.. ...3..ab|
0040 63 e9 d3 ce 00 00 a7 28-00 09 04 c0 00 33 06 00 |c......( .....3..|
0050 61 62 63 db ca e9      -                        |abc...|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 00 1f 00 36 01 00-ff 11 00 c3 00 01 00 00 |.....6.. ........|
0010 00 79 00 00 00 00 fe 00-00 e0 00 00 00 00 00    |.y...... .......|

token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2274:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2305:                rows_affected = 1
util.c:162:Changed query state from READING to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4054, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3421:odbc_process_tokens: processed TDS_DONEINPROC_RESULT
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4054
token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4053, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3397:odbc_process_tokens: row_count=1
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4053
odbc.c:3341:SQLExecute returns SQL_SUCCESS
odbc.c:3318:SQLExecute(0x8d5f228)
prepare_query.c:202:parsing 0 parameters
sql2tds.c:150:type=4
sql2tds.c:156:trace
sql2tds.c:150:type=1
sql2tds.c:156:trace
sql2tds.c:150:type=12
sql2tds.c:156:trace
odbc.c:3043:_SQLExecute(0x8d5f228)
odbc.c:3048:_SQLExecute() starting with state 0
odbc.c:3156:End prepare, execute
query.c:1631:tds_submit_execute()
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
query.c:1326:tds_put_data_info putting status 
query.c:1420:tds_put_data: colsize = 4
query.c:1449:tds_put_data: not null param varint_size = 1
query.c:1326:tds_put_data_info putting status 
query.c:1420:tds_put_data: colsize = 9
query.c:1449:tds_put_data: not null param varint_size = 2
util.c:334:tdserror(0x8d5c050, 0x8d5d3d8, 2402, 0)
odbc.c:2106:msgno 2402 20003
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
query.c:1326:tds_put_data_info putting status 
query.c:1420:tds_put_data: colsize = 21
query.c:1449:tds_put_data: not null param varint_size = 2
util.c:334:tdserror(0x8d5c050, 0x8d5d3d8, 2402, 0)
odbc.c:2106:msgno 2402 20003
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
util.c:162:Changed query state from QUERYING to PENDING
net.c:768:Sending packet
0000 03 01 00 46 00 00 01 00-0a 00 73 00 70 00 5f 00 |...F.... ..s.p._.|
0010 65 00 78 00 65 00 63 00-75 00 74 00 65 00 00 00 |e.x.e.c. u.t.e...|
0020 00 00 26 04 04 03 00 00-00 00 00 26 04 04 03 00 |..&..... ...&....|
0030 00 00 00 00 af 28 00 09-04 c0 00 33 00 00 a7 28 |.....(.. ...3...(|
0040 00 09 04 c0 00 33      -                        |.....3|

token.c:495:tds_process_tokens(0x8d5d3d8, 0xbfff0800, 0xbfff0804, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:662:Received packet
0000 04 01 01 4c 00 36 01 00-aa 38 01 45 1f 00 00 01 |...L.6.. .8.E....|
0010 10 8c 00 54 00 68 00 65-00 20 00 69 00 6e 00 63 |...T.h.e . .i.n.c|
0020 00 6f 00 6d 00 69 00 6e-00 67 00 20 00 74 00 61 |.o.m.i.n .g. .t.a|
0030 00 62 00 75 00 6c 00 61-00 72 00 20 00 64 00 61 |.b.u.l.a .r. .d.a|
0040 00 74 00 61 00 20 00 73-00 74 00 72 00 65 00 61 |.t.a. .s .t.r.e.a|
0050 00 6d 00 20 00 28 00 54-00 44 00 53 00 29 00 20 |.m. .(.T .D.S.). |
0060 00 72 00 65 00 6d 00 6f-00 74 00 65 00 20 00 70 |.r.e.m.o .t.e. .p|
0070 00 72 00 6f 00 63 00 65-00 64 00 75 00 72 00 65 |.r.o.c.e .d.u.r.e|
0080 00 20 00 63 00 61 00 6c-00 6c 00 20 00 28 00 52 |. .c.a.l .l. .(.R|
0090 00 50 00 43 00 29 00 20-00 70 00 72 00 6f 00 74 |.P.C.).  .p.r.o.t|
00a0 00 6f 00 63 00 6f 00 6c-00 20 00 73 00 74 00 72 |.o.c.o.l . .s.t.r|
00b0 00 65 00 61 00 6d 00 20-00 69 00 73 00 20 00 69 |.e.a.m.  .i.s. .i|
00c0 00 6e 00 63 00 6f 00 72-00 72 00 65 00 63 00 74 |.n.c.o.r .r.e.c.t|
00d0 00 2e 00 20 00 50 00 61-00 72 00 61 00 6d 00 65 |... .P.a .r.a.m.e|
00e0 00 74 00 65 00 72 00 20-00 34 00 3a 00 20 00 54 |.t.e.r.  .4.:. .T|
00f0 00 68 00 65 00 20 00 70-00 61 00 72 00 61 00 6d |.h.e. .p .a.r.a.m|
0100 00 65 00 74 00 65 00 72-00 20 00 6e 00 61 00 6d |.e.t.e.r . .n.a.m|
0110 00 65 00 20 00 69 00 73-00 20 00 69 00 6e 00 76 |.e. .i.s . .i.n.v|
0120 00 61 00 6c 00 69 00 64-00 2e 00 0a 43 00 4f 00 |.a.l.i.d ....C.O.|
0130 42 00 52 00 41 00 5c 00-4d 00 53 00 56 00 31 00 |B.R.A.\. M.S.V.1.|
0140 00 01 00 fd 02 00 fd 00-00 00 00 00             |........ ....|

token.c:510:processing result tokens.  marker is  aa(ERROR)
token.c:108:tds_process_default_tokens() marker is aa(ERROR)
token.c:2523:tds_process_msg() reading message from server
token.c:2596:tds_process_msg() calling client msg handler
odbc.c:2106:msgno 8005 20003
token.c:2609:tds_process_msg() returning TDS_SUCCEED
token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2274:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 1
		done_count_valid = 0
token.c:2290:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2305:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3356:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3357:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=2
odbc.c:3397:odbc_process_tokens: row_count=-1
odbc.c:3197:_SQLExecute: odbc_process_tokens returned result_type 4052
odbc.c:3341:SQLExecute returns SQL_ERROR or SQL_NULL_DATA
error.c:613:SQLGetDiagRec(3, 0x8d5f228, 1, 0xbfff08a0, 0xbfff089c, 0xbfff0680, 513, 0xbfff067e)
error.c:559:_SQLError: "The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 4: The parameter name is invalid."
error.c:618:SQLGetDiagRec returning 0



Archive powered by MHonArc 2.6.24.

Top of Page