Skip to Content.
Sympa Menu

freetds - Re: [freetds] issue with prepared statement queries from a Mac OS X client to SQL Server 2005

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Nick Davis <nick.davis AT vidoop.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] issue with prepared statement queries from a Mac OS X client to SQL Server 2005
  • Date: Mon, 13 Oct 2008 18:43:42 -0500

Heheh, sorry about that. Here's the entire log, with the machine data sanitized.

-Nick


James K. Lowden wrote:
Nick Davis wrote:
I'm using FreeTDS 0.82 on a Mac OS X Leopard machine to run some
prepared statements against our SQL Server 2005 database. The query
with the issue is:

SELECT COUNT(*) from tbl WHERE tbl_id = ?

Whenever I run the application, I receive the following error with the
query:

SQLSTATE = 420000
Native Error Code = 402
[FreeTDS][SQL Server]The data types varchar and text are incompatible in

the equal to operator.

However, tbl_id is of type VARCHAR(36) in the database, not TEXT.

I've attached a relevant section of the freetds dump file that may help

Please post more of the log file, at least the last 1000 lines and the
first 100. The part you posted was the server's error message (hey, I
believed you!) but what I'm interested in is how the query and parameter
data are sent to the server.

IIRC there's some gnarly code in the driver to divine the parameter
datatype. It might get yours wrong.

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
log.c:190:Starting log file for FreeTDS 0.82
on 2008-10-13 18:21: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 "ISO-8859-1" character
set
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:210:Connecting to 192.168.0.5 port 1433 (TDS version 8.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:303:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:735:quietly sending TDS 7+ login packet
token.c:312:tds_process_login_tokens()
net.c:592:Received header
0000 04 01 02 69 00 38 01 00- |...i.8..|

net.c:671:Received packet
/* Sanitized */
0170 00 e3 08 00 07 05 09 04-d0 00 34 00 e3 17 00 02 |........ ..4.....|
0180 0a 75 00 73 00 5f 00 65-00 6e 00 67 00 6c 00 69 |.u.s._.e .n.g.l.i|
0190 00 73 00 68 00 00 ab 70-00 47 16 00 00 01 00 27 |.s.h...p .G.....'|
01a0 00 43 00 68 00 61 00 6e-00 67 00 65 00 64 00 20 |.C.h.a.n .g.e.d. |
01b0 00 6c 00 61 00 6e 00 67-00 75 00 61 00 67 00 65 |.l.a.n.g .u.a.g.e|
01c0 00 20 00 73 00 65 00 74-00 74 00 69 00 6e 00 67 |. .s.e.t .t.i.n.g|
01d0 00 20 00 74 00 6f 00 20-00 75 00 73 00 5f 00 65 |. .t.o. .u.s._.e|
01e0 00 6e 00 67 00 6c 00 69-00 73 00 68 00 2e 00 0b |.n.g.l.i .s.h....|
0210 01 16 4d 00 69 00 63 00-72 00 6f 00 73 00 6f 00 |..M.i.c. r.o.s.o.|
0220 66 00 74 00 20 00 53 00-51 00 4c 00 20 00 53 00 |f.t. .S. Q.L. .S.|
0230 65 00 72 00 76 00 65 00-72 00 00 00 00 00 09 00 |e.r.v.e. r.......|
0240 05 77 e3 13 00 04 04 34-00 30 00 39 00 36 00 04 |.w.....4 .0.9.6..|
0250 34 00 30 00 39 00 36 00-fd 00 00 00 00 00 00 00 |4.0.9.6. ........|
0260 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:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 5701 20003
token.c:2529: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:2281:tds_process_env_chg(): 5 bytes of collation data received
token.c:2282: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 "ISO-8859-1"->"CP1252"
token.c:2292:tds->collation now
0000 09 04 d0 00 34 - |....4|

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:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 5703 20003
token.c:2529: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:316:looking for login token, got fd(DONE)
token.c:108:tds_process_default_tokens() marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
token.c:2232: rows_affected = 0
token.c:393:leaving tds_process_login_tokens() returning 1
odbc.c:5587:SQLGetInfo(0x100f200, 23, 0xe40c3c, 2, 0x0)
odbc.c:4841:_SQLGetInfo(0x100f200, 23, 0xe40c3c, 2, 0x0
odbc.c:5587:SQLGetInfo(0x100f200, 24, 0xe40c3e, 2, 0x0)
odbc.c:4841:_SQLGetInfo(0x100f200, 24, 0xe40c3e, 2, 0x0
odbc.c:5909:SQLSetConnectAttr(0x100f200, 111, 0x0, 0)
odbc.c:5827:_SQLSetConnectAttr(0x100f200, 111, 0x0, 0)
odbc.c:5587:SQLGetInfo(0x100f200, 46, 0xbffff186, 0, 0x0)
odbc.c:4841:_SQLGetInfo(0x100f200, 46, 0xbffff186, 0, 0x0
odbc.c:5909:SQLSetConnectAttr(0x100f200, 102, 0x0, 0)
odbc.c:5827:_SQLSetConnectAttr(0x100f200, 102, 0x0, 0)
odbc.c:213:change_autocommit: executing SET IMPLICIT_TRANSACTIONS ON
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 28 bytes of "SET IMPLICIT_TRANSACTIONS
ON"
write.c:164:tds_put_string wrote 56 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 40 00 00 01 00-53 00 45 00 54 00 20 00 |...@.... 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 4e 00 |T.I.O.N. S. .O.N.|

token.c:495:tds_process_tokens(0xe41330, 0xbffff3f4, 0xbffff3f0, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 11 00 38 01 00- |.....8..|

net.c:671:Received packet
0000 fd 00 00 b9 00 00 00 00-00 |........ .|

token.c:510:processing result tokens. marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff3f4, 0xbffff3f0, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:4539:SQLGetConnectAttr(0x100f200, 1209, 0xbffff64c, 0, 0x0)
odbc.c:4464:_SQLGetConnectAttr(0x100f200, 1209, 0xbffff64c, 0, 0x0)
odbc.c:4539:SQLGetConnectAttr(0x100f200, 1209, 0xbffff7dc, 0, 0x0)
odbc.c:4464:_SQLGetConnectAttr(0x100f200, 1209, 0xbffff7dc, 0, 0x0)
odbc.c:1244:SQLAllocHandle(3, 0x100f200, 0xe49024)
odbc.c:1403:_SQLAllocStmt(0x100f200, 0xe49024)
odbc.c:4079:SQLGetStmtAttr(0xe49150, 10010, 0xe41ff4, 0, 0x0)
odbc.c:3917:_SQLGetStmtAttr(0xe49150, 10010, 0xe41ff4, 0, 0x0)
odbc.c:4079:SQLGetStmtAttr(0xe49150, 10011, 0xe49234, 0, 0x0)
odbc.c:3917:_SQLGetStmtAttr(0xe49150, 10011, 0xe49234, 0, 0x0)
odbc.c:4079:SQLGetStmtAttr(0xe49150, 10012, 0xe49254, 0, 0x0)
odbc.c:3917:_SQLGetStmtAttr(0xe49150, 10012, 0xe49254, 0, 0x0)
odbc.c:4079:SQLGetStmtAttr(0xe49150, 10013, 0xe49274, 0, 0x0)
odbc.c:3917:_SQLGetStmtAttr(0xe49150, 10013, 0xe49274, 0, 0x0)
odbc.c:6208:SQLSetStmtAttr(0xe49150, 6, 0x0, 0)
odbc.c:5932:_SQLSetStmtAttr(0xe49150, 6, 0x0, 0)
odbc.c:6208:SQLSetStmtAttr(0xe49150, 18, 0x0, 0)
odbc.c:5932:_SQLSetStmtAttr(0xe49150, 18, 0x0, 0)
odbc.c:4124:SQLPrepare(0xe49150, DELETE FROM test;, 18)
odbc.c:4188: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:779:Sending packet
0000 03 01 00 60 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 d0 00 34 ff |&....c.. ......4.|
0020 ff ff ff 00 00 63 24 00-00 00 09 04 d0 00 34 24 |.....c$. ......4$|
0030 00 00 00 44 00 45 00 4c-00 45 00 54 00 45 00 20 |...D.E.L .E.T.E. |
0040 00 46 00 52 00 4f 00 4d-00 20 00 74 00 65 00 73 |.F.R.O.M . .t.e.s|
0050 00 74 00 3b 00 00 00 00-00 26 04 04 01 00 00 00 |.t.;.... .&......|

token.c:495:tds_process_tokens(0xe41330, 0xbffff5a0, 0xbffff59c, 0x104)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 2f 00 38 01 00- |.../.8..|

net.c:671:Received packet
0000 ff 11 00 c4 00 00 00 00-00 79 00 00 00 00 ac 0d |........ .y......|
0010 00 00 01 00 00 00 00 26-04 04 01 00 00 00 fe 00 |.......& ........|
0020 00 e0 00 00 00 00 00 - |.......|

token.c:510:processing result tokens. marker is ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
was_cancelled = 0
error = 0
done_count_valid = 1
token.c:2232: 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(0xe41330, 0xbffff520)
token.c:1596:processing result. type = 38(integer-null), varint_size 1
token.c:1617:processing result. column_size 4
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 4
token.c:573:1 hidden return parameters
token.c:510:processing result tokens. marker is fe(DONEPROC)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff5a0, 0xbffff59c, 0x104)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:4100:SQLNumResultCols(0xe49150, 0xbffff61a)
odbc.c:3867:SQLCloseCursor(0xe49150)
odbc.c:3769:_SQLFreeStmt(0xe49150, 0, 0)
odbc.c:3237:SQLExecute(0xe49150)
odbc.c:2965:_SQLExecute(0xe49150)
odbc.c:2970:_SQLExecute() starting with state 0
odbc.c:3078: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:779: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(0xe41330, 0xbffff594, 0xbffff590, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 1f 00 38 01 00- |.....8..|

net.c:671:Received packet
0000 ff 11 00 c4 00 00 00 00-00 79 00 00 00 00 fe 00 |........ .y......|
0010 00 e0 00 00 00 00 00 - |.......|

token.c:510:processing result tokens. marker is ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
was_cancelled = 0
error = 0
done_count_valid = 1
token.c:2232: rows_affected = 0
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270: result_type=4054, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3334:odbc_process_tokens: processed TDS_DONEINPROC_RESULT
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4054
token.c:495:tds_process_tokens(0xe41330, 0xbffff594, 0xbffff590, 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:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270: result_type=4053, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3310:odbc_process_tokens: row_count=0
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4053
odbc.c:4100:SQLNumResultCols(0xe49150, 0xbffff62a)
odbc.c:4539:SQLGetConnectAttr(0x100f200, 102, 0xbffff774, 0, 0x0)
odbc.c:4464:_SQLGetConnectAttr(0x100f200, 102, 0xbffff774, 0, 0x0)
odbc.c:4388:SQLEndTran(2, 0x100f200, 0)
odbc.c:4366:_SQLTransact(0x0, 0x100f200, 0)
odbc.c:4327:change_transaction(0x0x100f200,1)
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 25 bytes of "IF @@TRANCOUNT > 0 COMMIT"
write.c:164:tds_put_string wrote 50 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 3a 00 00 01 00-49 00 46 00 20 00 40 00 |...:.... I.F. .@.|
0010 40 00 54 00 52 00 41 00-4e 00 43 00 4f 00 55 00 |@.T.R.A. N.C.O.U.|
0020 4e 00 54 00 20 00 3e 00-20 00 30 00 20 00 43 00 |N.T. .>. .0. .C.|
0030 4f 00 4d 00 4d 00 49 00-54 00 |O.M.M.I. T.|

token.c:495:tds_process_tokens(0xe41330, 0xbffff554, 0xbffff550, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 1a 00 38 01 00- |.....8..|

net.c:671:Received packet
0000 fd 01 00 c0 00 00 00 00-00 fd 00 00 d5 00 00 00 |........ ........|
0010 00 00 - |..|

token.c:510:processing result tokens. marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 1
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2232: rows_affected = 0
util.c:162:Changed query state from READING to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff554, 0xbffff550, 0x100)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens. marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff554, 0xbffff550, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:4539:SQLGetConnectAttr(0x100f200, 1209, 0xbffff5ec, 0, 0x0)
odbc.c:4464:_SQLGetConnectAttr(0x100f200, 1209, 0xbffff5ec, 0, 0x0)
odbc.c:1244:SQLAllocHandle(3, 0x100f200, 0xe4bb64)
odbc.c:1403:_SQLAllocStmt(0x100f200, 0xe4bb64)
odbc.c:4079:SQLGetStmtAttr(0xe4bc10, 10010, 0xe4b9a4, 0, 0x0)
odbc.c:3917:_SQLGetStmtAttr(0xe4bc10, 10010, 0xe4b9a4, 0, 0x0)
odbc.c:4079:SQLGetStmtAttr(0xe4bc10, 10011, 0xed5724, 0, 0x0)
odbc.c:3917:_SQLGetStmtAttr(0xe4bc10, 10011, 0xed5724, 0, 0x0)
odbc.c:4079:SQLGetStmtAttr(0xe4bc10, 10012, 0xe4bd34, 0, 0x0)
odbc.c:3917:_SQLGetStmtAttr(0xe4bc10, 10012, 0xe4bd34, 0, 0x0)
odbc.c:4079:SQLGetStmtAttr(0xe4bc10, 10013, 0xe4bd54, 0, 0x0)
odbc.c:3917:_SQLGetStmtAttr(0xe4bc10, 10013, 0xe4bd54, 0, 0x0)
odbc.c:6208:SQLSetStmtAttr(0xe4bc10, 6, 0x0, 0)
odbc.c:5932:_SQLSetStmtAttr(0xe4bc10, 6, 0x0, 0)
odbc.c:6208:SQLSetStmtAttr(0xe4bc10, 18, 0x0, 0)
odbc.c:5932:_SQLSetStmtAttr(0xe4bc10, 18, 0x0, 0)
odbc.c:4124:SQLPrepare(0xe4bc10, SELECT COUNT(*) FROM tbl WHERE tbl_id = ?;,
42)
odbc.c:4188: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
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 03 01 00 b2 00 00 01 00-ff ff 0b 00 00 00 00 01 |........ ........|
0010 26 04 00 00 00 63 1e 00-00 00 09 04 d0 00 34 1e |&....c.. ......4.|
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 00 00 63 58 00 00 00-09 04 d0 00 34 58 00 00 |...cX... ....4X..|
0050 00 53 00 45 00 4c 00 45-00 43 00 54 00 20 00 43 |.S.E.L.E .C.T. .C|
0060 00 4f 00 55 00 4e 00 54-00 28 00 2a 00 29 00 20 |.O.U.N.T .(.*.). |
0070 00 46 00 52 00 4f 00 4d-00 20 00 74 00 62 00 6c |.F.R.O.M . .t.b.l|
0080 00 20 00 57 00 48 00 45-00 52 00 45 00 20 00 74 |. .W.H.E .R.E. .t|
0090 00 62 00 6c 00 5f 00 69-00 64 00 20 00 3d 00 20 |.b.l._.i .d. .=. |
00a0 00 40 00 50 00 31 00 3b-00 00 00 26 04 04 01 00 |.@.P.1.; ...&....|
00b0 00 00 - |..|

token.c:495:tds_process_tokens(0xe41330, 0xbffff3b0, 0xbffff3ac, 0x104)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 39 00 38 01 00- |...9.8..|

net.c:671:Received packet
0000 81 01 00 00 00 01 00 26-04 00 ff 11 00 c1 00 00 |.......& ........|
0010 00 00 00 79 00 00 00 00-ac 0d 00 00 01 00 00 00 |...y.... ........|
0020 00 26 04 04 02 00 00 00-fe 00 00 e0 00 00 00 00 |.&...... ........|
0030 00 - |.|

token.c:510:processing result tokens. marker is 81(TDS7_RESULT)
token.c:1520:processing TDS7 result metadata.
mem.c:563:tds_free_all_results()
token.c:1544:set current_results (1 column) to tds->res_info
token.c:1555:setting up column 0
token.c:1490:tds7_get_data_info:
colname = (0 bytes)
type = 38 (integer-null)
server's type = 38 (integer-null)
column_varint_size = 1
column_size = 4 (4 on server)
util.c:162:Changed query state from READING to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff3b0, 0xbffff3ac, 0x104)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens. marker is ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
was_cancelled = 0
error = 0
done_count_valid = 1
token.c:2232: 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(0xe41330, 0xbffff330)
token.c:1596:processing result. type = 38(integer-null), varint_size 1
token.c:1617:processing result. column_size 4
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 4
token.c:573:1 hidden return parameters
token.c:510:processing result tokens. marker is fe(DONEPROC)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff3b0, 0xbffff3ac, 0x104)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:4100:SQLNumResultCols(0xe4bc10, 0xbffff42a)
odbc.c:3867:SQLCloseCursor(0xe4bc10)
odbc.c:3769:_SQLFreeStmt(0xe4bc10, 0, 0)
odbc.c:1235:SQLBindParam(0xe4bc10, 1, 1, -1, 8, 0, 0xe7bae0, 0xe4bfa0)
odbc.c:1125:_SQLBindParameter(0xe4bc10, 1, 1, 1, -1, 8, 0, 0xe7bae0, 0,
0xe4bfa0)
odbc.c:3237:SQLExecute(0xe4bc10)
sql2tds.c:150:type=-1
sql2tds.c:156:trace
odbc.c:2965:_SQLExecute(0xe4bc10)
odbc.c:2970:_SQLExecute() starting with state 0
query.c:1768:tds_submit_unprepare() g5lbc09000
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:779: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(0xe41330, 0xbffff364, 0xbffff360, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 16 00 38 01 00- |.....8..|

net.c:671:Received packet
0000 79 00 00 00 00 fe 00 00-e0 00 00 00 00 00 |y....... ......|

token.c:510:processing result tokens. marker is 79(RETURNSTATUS)
token.c:510:processing result tokens. marker is fe(DONEPROC)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff364, 0xbffff360, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:3058: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
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 03 01 00 a4 00 00 01 00-ff ff 0b 00 00 00 00 01 |........ ........|
0010 26 04 00 00 00 63 10 00-00 00 09 04 d0 00 34 10 |&....c.. ......4.|
0020 00 00 00 40 00 50 00 31-00 20 00 54 00 45 00 58 |...@.P.1 . .T.E.X|
0030 00 54 00 00 00 63 58 00-00 00 09 04 d0 00 34 58 |.T...cX. ......4X|
0040 00 00 00 53 00 45 00 4c-00 45 00 43 00 54 00 20 |...S.E.L .E.C.T. |
0050 00 43 00 4f 00 55 00 4e-00 54 00 28 00 2a 00 29 |.C.O.U.N .T.(.*.)|
0060 00 20 00 46 00 52 00 4f-00 4d 00 20 00 74 00 62 |. .F.R.O .M. .t.b|
0070 00 6c 00 20 00 57 00 48-00 45 00 52 00 45 00 20 |.l. .W.H .E.R.E. |
0080 00 74 00 62 00 6c 00 5f-00 69 00 64 00 20 00 3d |.t.b.l._ .i.d. .=|
0090 00 20 00 40 00 50 00 31-00 3b 00 00 00 26 04 04 |. .@.P.1 .;...&..|
00a0 01 00 00 00 - |....|

token.c:495:tds_process_tokens(0xe41330, 0xbffff3a4, 0xbffff3a0, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 01 46 00 38 01 00- |...F.8..|

net.c:671:Received packet
0000 aa b6 00 92 01 00 00 01-10 4a 00 54 00 68 00 65 |........ .J.T.h.e|
0010 00 20 00 64 00 61 00 74-00 61 00 20 00 74 00 79 |. .d.a.t .a. .t.y|
0020 00 70 00 65 00 73 00 20-00 76 00 61 00 72 00 63 |.p.e.s. .v.a.r.c|
0030 00 68 00 61 00 72 00 20-00 61 00 6e 00 64 00 20 |.h.a.r. .a.n.d. |
0040 00 74 00 65 00 78 00 74-00 20 00 61 00 72 00 65 |.t.e.x.t . .a.r.e|
0050 00 20 00 69 00 6e 00 63-00 6f 00 6d 00 70 00 61 |. .i.n.c .o.m.p.a|
0060 00 74 00 69 00 62 00 6c-00 65 00 20 00 69 00 6e |.t.i.b.l .e. .i.n|
0070 00 20 00 74 00 68 00 65-00 20 00 65 00 71 00 75 |. .t.h.e . .e.q.u|
0080 00 61 00 6c 00 20 00 74-00 6f 00 20 00 6f 00 70 |.a.l. .t .o. .o.p|
0090 00 65 00 72 00 61 00 74-00 6f 00 72 00 2e 00 0b |.e.r.a.t .o.r....|
00a0 57 00 43 00 2d 00 54 00-45 00 53 00 54 00 2d 00 |W.C.-.T. E.S.T.-.|
00b0 57 00 49 00 4e 00 00 01-00 aa 68 00 f4 1f 00 00 |W.I.N... ..h.....|
00c0 01 10 23 00 53 00 74 00-61 00 74 00 65 00 6d 00 |..#.S.t. a.t.e.m.|
00d0 65 00 6e 00 74 00 28 00-73 00 29 00 20 00 63 00 |e.n.t.(. s.). .c.|
00e0 6f 00 75 00 6c 00 64 00-20 00 6e 00 6f 00 74 00 |o.u.l.d. .n.o.t.|
00f0 20 00 62 00 65 00 20 00-70 00 72 00 65 00 70 00 | .b.e. . p.r.e.p.|
0100 61 00 72 00 65 00 64 00-2e 00 0b 57 00 43 00 2d |a.r.e.d. ...W.C.-|
0110 00 54 00 45 00 53 00 54-00 2d 00 57 00 49 00 4e |.T.E.S.T .-.W.I.N|
0120 00 00 01 00 79 f4 1f 00-00 ac 09 00 00 01 00 00 |....y... ........|
0130 00 00 26 04 00 fe 02 00-e0 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:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 402 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:510:processing result tokens. marker is aa(ERROR)
token.c:108:tds_process_default_tokens() marker is aa(ERROR)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 8180 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
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(0xe41330, 0xbffff350)
token.c:1596:processing result. type = 38(integer-null), varint_size 1
token.c:1617:processing result. column_size 4
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1
token.c:573:1 hidden return parameters
token.c:510:processing result tokens. marker is fe(DONEPROC)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 1
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff3a4, 0xbffff3a0, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:764:SQLNativeSql(0x100f200, SELECT COUNT(*) FROM tbl WHERE tbl_id =
?;, 42, 0xe4c210, 84, 0xbffff3e8)
error.c:609:SQLGetDiagRec(3, 0xe4bc10, 1, 0xbffff15c, 0xbffff364, 0xbffff162,
513, 0xbffff36a)
error.c:510:_SQLGetDiagRec(3, 0xe4bc10, 1, 0xbffff15c, 0xbffff364,
0xbffff162, 513, 0xbffff36a)
error.c:630:SQLGetDiagField(3, 0xe4bc10, 1, 10, 0xe4c590, 128, 0xbffff36a)
error.c:630:SQLGetDiagField(3, 0xe4bc10, 1, 11, 0xe4c610, 128, 0xbffff36a)
error.c:609:SQLGetDiagRec(3, 0xe4bc10, 2, 0xbffff15c, 0xbffff364, 0xbffff162,
513, 0xbffff36a)
error.c:510:_SQLGetDiagRec(3, 0xe4bc10, 2, 0xbffff15c, 0xbffff364,
0xbffff162, 513, 0xbffff36a)
error.c:609:SQLGetDiagRec(3, 0xe4bc10, 3, 0xbffff15c, 0xbffff364, 0xbffff162,
513, 0xbffff36a)
error.c:510:_SQLGetDiagRec(3, 0xe4bc10, 3, 0xbffff15c, 0xbffff364,
0xbffff162, 513, 0xbffff36a)
odbc.c:4539:SQLGetConnectAttr(0x100f200, 1209, 0xbffff80c, 0, 0x0)
odbc.c:4464:_SQLGetConnectAttr(0x100f200, 1209, 0xbffff80c, 0, 0x0)
odbc.c:4539:SQLGetConnectAttr(0x100f200, 102, 0xbffff7c4, 0, 0x0)
odbc.c:4464:_SQLGetConnectAttr(0x100f200, 102, 0xbffff7c4, 0, 0x0)
odbc.c:4388:SQLEndTran(2, 0x100f200, 0)
odbc.c:4366:_SQLTransact(0x0, 0x100f200, 0)
odbc.c:4327:change_transaction(0x0x100f200,1)
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 25 bytes of "IF @@TRANCOUNT > 0 COMMIT"
write.c:164:tds_put_string wrote 50 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 3a 00 00 01 00-49 00 46 00 20 00 40 00 |...:.... I.F. .@.|
0010 40 00 54 00 52 00 41 00-4e 00 43 00 4f 00 55 00 |@.T.R.A. N.C.O.U.|
0020 4e 00 54 00 20 00 3e 00-20 00 30 00 20 00 43 00 |N.T. .>. .0. .C.|
0030 4f 00 4d 00 4d 00 49 00-54 00 |O.M.M.I. T.|

token.c:495:tds_process_tokens(0xe41330, 0xbffff5a4, 0xbffff5a0, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 1a 00 38 01 00- |.....8..|

net.c:671:Received packet
0000 fd 01 00 c0 00 00 00 00-00 fd 00 00 d5 00 00 00 |........ ........|
0010 00 00 - |..|

token.c:510:processing result tokens. marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 1
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2232: rows_affected = 0
util.c:162:Changed query state from READING to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff5a4, 0xbffff5a0, 0x100)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens. marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff5a4, 0xbffff5a0, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:2005:SQLDisconnect(0x100f200)
odbc.c:3769:_SQLFreeStmt(0xe4bc10, 1, 1)
odbc.c:3769:_SQLFreeStmt(0xe49150, 1, 1)
query.c:1768:tds_submit_unprepare() g5lbc06000
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:779: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(0xe41330, 0xbffff674, 0xbffff670, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 16 00 38 01 00- |.....8..|

net.c:671:Received packet
0000 79 00 00 00 00 fe 00 00-e0 00 00 00 00 00 |y....... ......|

token.c:510:processing result tokens. marker is 79(RETURNSTATUS)
token.c:510:processing result tokens. marker is fe(DONEPROC)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0xe41330, 0xbffff674, 0xbffff670, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to DEAD
odbc.c:3680:SQLFreeHandle(2, 0x0x100f200)
odbc.c:3706:_SQLFreeConnect(0x100f200)
odbc.c:3680:SQLFreeHandle(1, 0x0xe411e0)
odbc.c:3744:_SQLFreeEnv(0xe411e0)



Archive powered by MHonArc 2.6.24.

Top of Page