stored procedure call with OUTPUT params not working using ruby-odbc/unixodbc/freetds/mssql

Chris Hall <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
I have a test SP I am trying to run on SQLServerExpress:

# CREATE PROCEDURE dbo.up_TestSP4(@NotUsed INT, @ReturnVar INT OUTPUT)
# AS
# SET @ReturnVar = 666
# /*
# DECLARE @P2 INT
# EXEC dbo.up_TestSP4 10, @P2 OUTPUT
# SELECT @P2
# */

works in tsql no problems.

ruby script (per example found at
http://www.ch-werner.de/rubyodbc/odbc.html#stmt_param_iotype):

begin
  conn = ODBC::Database.connect("DSN", "xxx", "xxx")
  stmt = conn.prepare("exec dbo.up_TestSP4 ?, ?")
  stmt.param_iotype(1, ODBC::SQL_PARAM_OUTPUT)
  stmt.param_output_type(1, ODBC::SQL_INTEGER)
  stmt.param_output_size(1, 4)
  stmt.execute(1, nil)
  res = stmt.fetch_all
  out_value = stmt.param_output_value(1)
  puts "#{out_value}"
rescue Exception => e
  puts e
  puts e.backtrace.join("\n")
ensure
  stmt.cancel if stmt
  conn.disconnect if conn && conn.connected?
end

however, when running this script, i get:

# 2000 (8162) [FreeTDS][SQL Server]The formal parameter "@P2" was not
# declared as an OUTPUT parameter, but the actual parameter passed in
# requested output.

installed tools/libs:

freetds-0.82 (--with-unixodbc=/usr/local --with-tdsver=8.0
--enable-msdblib --enable-sybase-compat)
unixodbc-2.2.14 (--enable-gui=no)
ruby-odbc 0.9996

I'm wondering if anyone can tell from the dump if I am missing
something?  I can see there is a call to SQLBindParameter which looks
correct to me, yet I'm getting the above error.  Thanks in advance.

freetds dump:

15:50:13.835296 99259 (log.c:190):Starting log file for FreeTDS 0.82
	on 2009-03-23 15:50:13 with debug flags 0xffff.
15:50:13.835529 99259 (iconv.c:197):names for ISO-8859-1: ISO-8859-1
15:50:13.835558 99259 (iconv.c:197):names for UTF-8: UTF-8
15:50:13.835573 99259 (iconv.c:197):names for UCS-2LE: UCS-2LE
15:50:13.835588 99259 (iconv.c:197):names for UCS-2BE: UCS-2BE
15:50:13.835602 99259 (iconv.c:363):iconv to convert client-side data
to the "ISO-8859-1" character set
15:50:13.835643 99259 (iconv.c:516):tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
15:50:13.835847 99259 (iconv.c:516):tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
15:50:13.835959 99259 (net.c:210):Connecting to 10.211.55.3 port 4444
(TDS version 8.0)
15:50:13.836130 99259 (net.c:264):tds_open_socket: connect(2) returned
"Operation now in progress"
15:50:13.838702 99259 (net.c:303):tds_open_socket() succeeded
15:50:13.838748 99259 (util.c:162):Changed query state from DEAD to IDLE
15:50:13.838771 99259 (login.c:735):quietly sending TDS 7+ login packet
15:50:13.839006 99259 (token.c:312):tds_process_login_tokens()
15:50:13.840439 99259 (net.c:592):Received header
0000 04 01 01 c9 00 36 01 00-                        |.....6..|

15:50:13.840492 99259 (net.c:671):Received packet
0000 e3 23 00 01 0a 41 00 64-00 50 00 6c 00 61 00 74 |.#...A.d .P.l.a.t|
0010 00 66 00 6f 00 72 00 6d-00 06 6d 00 61 00 73 00 |.f.o.r.m ..m.a.s.|
0020 74 00 65 00 72 00 ab 8e-00 45 16 00 00 02 00 29 |t.e.r... .E.....)|
0030 00 43 00 68 00 61 00 6e-00 67 00 65 00 64 00 20 |.C.h.a.n .g.e.d. |
0040 00 64 00 61 00 74 00 61-00 62 00 61 00 73 00 65 |.d.a.t.a .b.a.s.e|
0050 00 20 00 63 00 6f 00 6e-00 74 00 65 00 78 00 74 |. .c.o.n .t.e.x.t|
0060 00 20 00 74 00 6f 00 20-00 27 00 41 00 64 00 50 |. .t.o.  .'.A.d.P|
0070 00 6c 00 61 00 74 00 66-00 6f 00 72 00 6d 00 27 |.l.a.t.f .o.r.m.'|
0080 00 2e 00 18 43 00 48 00-52 00 49 00 53 00 48 00 |....C.H. R.I.S.H.|
0090 41 00 4c 00 4c 00 34 00-44 00 34 00 39 00 5c 00 |A.L.L.4. D.4.9.\.|
00a0 53 00 51 00 4c 00 45 00-58 00 50 00 52 00 45 00 |S.Q.L.E. X.P.R.E.|
00b0 53 00 53 00 00 01 00 e3-08 00 07 05 09 04 d0 00 |S.S..... ........|
00c0 34 00 e3 17 00 02 0a 75-00 73 00 5f 00 65 00 6e |4......u .s._.e.n|
00d0 00 67 00 6c 00 69 00 73-00 68 00 00 ab 8a 00 47 |.g.l.i.s .h.....G|
00e0 16 00 00 01 00 27 00 43-00 68 00 61 00 6e 00 67 |.....'.C .h.a.n.g|
00f0 00 65 00 64 00 20 00 6c-00 61 00 6e 00 67 00 75 |.e.d. .l .a.n.g.u|
0100 00 61 00 67 00 65 00 20-00 73 00 65 00 74 00 74 |.a.g.e.  .s.e.t.t|
0110 00 69 00 6e 00 67 00 20-00 74 00 6f 00 20 00 75 |.i.n.g.  .t.o. .u|
0120 00 73 00 5f 00 65 00 6e-00 67 00 6c 00 69 00 73 |.s._.e.n .g.l.i.s|
0130 00 68 00 2e 00 18 43 00-48 00 52 00 49 00 53 00 |.h....C. H.R.I.S.|
0140 48 00 41 00 4c 00 4c 00-34 00 44 00 34 00 39 00 |H.A.L.L. 4.D.4.9.|
0150 5c 00 53 00 51 00 4c 00-45 00 58 00 50 00 52 00 |\.S.Q.L. E.X.P.R.|
0160 45 00 53 00 53 00 00 01-00 ad 36 00 01 71 00 00 |E.S.S... ..6..q..|
0170 01 16 4d 00 69 00 63 00-72 00 6f 00 73 00 6f 00 |..M.i.c. r.o.s.o.|
0180 66 00 74 00 20 00 53 00-51 00 4c 00 20 00 53 00 |f.t. .S. Q.L. .S.|
0190 65 00 72 00 76 00 65 00-72 00 00 00 00 00 09 00 |e.r.v.e. r.......|
01a0 05 77 e3 13 00 04 04 34-00 30 00 39 00 36 00 04 |.w.....4 .0.9.6..|
01b0 34 00 30 00 39 00 36 00-fd 00 00 00 00 00 00 00 |4.0.9.6. ........|
01c0 00                     -                        |.|

15:50:13.840726 99259 (token.c:316):looking for login token, got  e3(ENVCHANGE)
15:50:13.840743 99259 (token.c:108):tds_process_default_tokens()
marker is e3(ENVCHANGE)
15:50:13.840790 99259 (token.c:316):looking for login token, got  ab(INFO)
15:50:13.840801 99259 (token.c:108):tds_process_default_tokens()
marker is ab(INFO)
15:50:13.840817 99259 (token.c:2451):tds_process_msg() reading message
from server
15:50:13.840842 99259 (token.c:2516):tds_process_msg() calling client
msg handler
15:50:13.840858 99259 (odbc.c:2032):msgno 5701 20003
15:50:13.840892 99259 (token.c:2529):tds_process_msg() returning TDS_SUCCEED
15:50:13.840902 99259 (token.c:316):looking for login token, got  e3(ENVCHANGE)
15:50:13.840912 99259 (token.c:108):tds_process_default_tokens()
marker is e3(ENVCHANGE)
15:50:13.840950 99259 (token.c:2281):tds_process_env_chg(): 5 bytes of
collation data received
15:50:13.840960 99259 (token.c:2282):tds->collation was
0000 00 00 00 00 00         -                        |.....|

15:50:13.840985 99259 (iconv.c:985):setting server single-byte charset
to "CP1252"
15:50:13.841003 99259 (iconv.c:516):tds_iconv_info_init: converting
"ISO-8859-1"->"CP1252"
15:50:13.841013 99259 (token.c:2292):tds->collation now
0000 09 04 d0 00 34         -                        |....4|

15:50:13.841025 99259 (token.c:316):looking for login token, got  e3(ENVCHANGE)
15:50:13.841035 99259 (token.c:108):tds_process_default_tokens()
marker is e3(ENVCHANGE)
15:50:13.841046 99259 (token.c:316):looking for login token, got  ab(INFO)
15:50:13.841055 99259 (token.c:108):tds_process_default_tokens()
marker is ab(INFO)
15:50:13.841065 99259 (token.c:2451):tds_process_msg() reading message
from server
15:50:13.841076 99259 (token.c:2516):tds_process_msg() calling client
msg handler
15:50:13.841086 99259 (odbc.c:2032):msgno 5703 20003
15:50:13.841098 99259 (token.c:2529):tds_process_msg() returning TDS_SUCCEED
15:50:13.841107 99259 (token.c:316):looking for login token, got  ad(LOGINACK)
15:50:13.841118 99259 (token.c:316):looking for login token, got  e3(ENVCHANGE)
15:50:13.841128 99259 (token.c:108):tds_process_default_tokens()
marker is e3(ENVCHANGE)
15:50:13.841140 99259 (token.c:316):looking for login token, got  fd(DONE)
15:50:13.841149 99259 (token.c:108):tds_process_default_tokens()
marker is fd(DONE)
15:50:13.841164 99259 (token.c:2201):tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
15:50:13.841175 99259 (token.c:2217):tds_process_end() state set to TDS_IDLE
15:50:13.841184 99259 (token.c:2232):                rows_affected = 0
15:50:13.841193 99259 (token.c:393):leaving tds_process_login_tokens()
returning 1
15:50:13.841240 99259 (mem.c:563):tds_free_all_results()
15:50:13.841272 99259 (util.c:162):Changed query state from IDLE to QUERYING
15:50:13.841283 99259 (write.c:136):tds_put_string converting 19 bytes
of "set textsize 64512 "
15:50:13.841294 99259 (write.c:164):tds_put_string wrote 38 bytes
15:50:13.841313 99259 (util.c:162):Changed query state from QUERYING to PENDING
15:50:13.841323 99259 (net.c:779):Sending packet
0000 01 01 00 2e 00 00 00 00-73 00 65 00 74 00 20 00 |........ s.e.t. .|
0010 74 00 65 00 78 00 74 00-73 00 69 00 7a 00 65 00 |t.e.x.t. s.i.z.e.|
0020 20 00 36 00 34 00 35 00-31 00 32 00 20 00       | .6.4.5. 1.2. .|

15:50:13.841391 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffd21c, 0xbfffd218, 0x100)
15:50:13.841403 99259 (util.c:162):Changed query state from PENDING to READING
15:50:13.842011 99259 (net.c:592):Received header
0000 04 01 00 11 00 36 01 00-                        |.....6..|

15:50:13.842044 99259 (net.c:671):Received packet
0000 fd 00 00 be 00 00 00 00-00                      |........ .|

15:50:13.842059 99259 (token.c:510):processing result tokens.  marker
is  fd(DONE)
15:50:13.842075 99259 (token.c:2201):tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
15:50:13.842086 99259 (token.c:2217):tds_process_end() state set to TDS_IDLE
15:50:13.842095 99259 (util.c:162):Changed query state from READING to IDLE
15:50:13.842105 99259 (token.c:2232):                rows_affected = 0
15:50:13.842114 99259 (util.c:110):logic error: cannot change query
state from IDLE to PENDING
15:50:13.842124 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffd21c, 0xbfffd218, 0x100)
15:50:13.842134 99259 (token.c:498):tds_process_tokens() state is COMPLETED
15:50:13.842178 99259 (odbc.c:4672):SQLGetFunctions: fFunction is 999
15:50:13.842201 99259 (odbc.c:5587):SQLGetInfo(0x802a00, 77,
0xbfffd538, 20, 0x0)
15:50:13.842212 99259 (odbc.c:4841):_SQLGetInfo(0x802a00, 77,
0xbfffd538, 20, 0x0
15:50:13.842245 99259 (error.c:609):SQLGetDiagRec(2, 0x802a00, 1,
0xbfffd18e, 0xbfffd19c, 0xbfffcf8e, 512, 0xbfffd198)
15:50:13.842262 99259 (error.c:510):_SQLGetDiagRec(2, 0x802a00, 1,
0xbfffd18e, 0xbfffd19c, 0xbfffcf8e, 512, 0xbfffd198)
15:50:13.842324 99259 (odbc.c:1504):SQLAllocStmt(0x802a00, 0x82c410)
15:50:13.842336 99259 (odbc.c:1403):_SQLAllocStmt(0x802a00, 0x82c410)
15:50:13.842358 99259 (odbc.c:4079):SQLGetStmtAttr(0x101d740, 10010,
0xbfffe77c, 4, 0x0)
15:50:13.842369 99259 (odbc.c:3917):_SQLGetStmtAttr(0x101d740, 10010,
0xbfffe77c, 4, 0x0)
15:50:13.842380 99259 (odbc.c:4079):SQLGetStmtAttr(0x101d740, 10011,
0xbfffe77c, 4, 0x0)
15:50:13.842390 99259 (odbc.c:3917):_SQLGetStmtAttr(0x101d740, 10011,
0xbfffe77c, 4, 0x0)
15:50:13.842401 99259 (odbc.c:4079):SQLGetStmtAttr(0x101d740, 10012,
0xbfffe77c, 4, 0x0)
15:50:13.842411 99259 (odbc.c:3917):_SQLGetStmtAttr(0x101d740, 10012,
0xbfffe77c, 4, 0x0)
15:50:13.842421 99259 (odbc.c:4079):SQLGetStmtAttr(0x101d740, 10013,
0xbfffe77c, 4, 0x0)
15:50:13.842431 99259 (odbc.c:3917):_SQLGetStmtAttr(0x101d740, 10013,
0xbfffe77c, 4, 0x0)
15:50:13.842457 99259 (odbc.c:4124):SQLPrepare(0x101d740, exec
dbo.up_TestSP4 ?, ? OUTPUT, -3)
15:50:13.842490 99259 (odbc.c:4188):Creating prepared statement
15:50:13.842528 99259 (mem.c:563):tds_free_all_results()
15:50:13.842539 99259 (util.c:162):Changed query state from IDLE to QUERYING
15:50:13.842554 99259 (write.c:136):tds_put_string converting 3 bytes of "@P1"
15:50:13.842564 99259 (write.c:164):tds_put_string wrote 6 bytes
15:50:13.842575 99259 (write.c:136):tds_put_string converting 3 bytes of "@P2"
15:50:13.842584 99259 (write.c:164):tds_put_string wrote 6 bytes
15:50:13.842595 99259 (util.c:162):Changed query state from QUERYING to PENDING
15:50:13.842605 99259 (net.c:779):Sending packet
0000 03 01 00 c0 00 00 01 00-ff ff 0b 00 00 00 00 01 |........ ........|
0010 26 04 00 00 00 63 3e 00-00 00 09 04 d0 00 34 3e |&....c>. ......4>|
0020 00 00 00 40 00 50 00 31-00 20 00 76 00 61 00 72 |[email protected] . .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 |.,[email protected] . .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 00 00 63 46 00 00 00-09 04 d0 00 34 46 00 00 |...cF... ....4F..|
0070 00 65 00 78 00 65 00 63-00 20 00 64 00 62 00 6f |.e.x.e.c . .d.b.o|
0080 00 2e 00 75 00 70 00 5f-00 54 00 65 00 73 00 74 |...u.p._ .T.e.s.t|
0090 00 53 00 50 00 34 00 20-00 40 00 50 00 31 00 2c |.S.P.4.  [email protected].,|
00a0 00 20 00 40 00 50 00 32-00 20 00 4f 00 55 00 54 |. [email protected] . .O.U.T|
00b0 00 50 00 55 00 54 00 00-00 26 04 04 01 00 00 00 |.P.U.T.. .&......|

15:50:13.842716 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe66c, 0xbfffe668, 0x104)
15:50:13.842728 99259 (util.c:162):Changed query state from PENDING to READING
15:50:13.843408 99259 (net.c:592):Received header
0000 04 01 00 2f 00 36 01 00-                        |.../.6..|

15:50:13.843441 99259 (net.c:671):Received packet
0000 ff 01 00 e0 00 00 00 00-00 79 f6 1f 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   -                        |.......|

15:50:13.843468 99259 (token.c:510):processing result tokens.  marker
is  ff(DONEINPROC)
15:50:13.843478 99259 (token.c:2201):tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 0
15:50:13.843488 99259 (token.c:2232):                rows_affected = 0
15:50:13.843498 99259 (token.c:510):processing result tokens.  marker
is  79(RETURNSTATUS)
15:50:13.843517 99259 (token.c:510):processing result tokens.  marker
is  ac(PARAM)
15:50:13.843534 99259 (token.c:567):processing parameters for sp 11
15:50:13.843550 99259 (token.c:569):calling tds_process_param_result
15:50:13.843559 99259
(token.c:1198):tds_process_param_result(0x101dd90, 0xbfffe5fc)
15:50:13.843596 99259 (token.c:1596):processing result. type =
38(integer-null), varint_size 1
15:50:13.843607 99259 (token.c:1617):processing result. column_size 4
15:50:13.843623 99259 (token.c:1915):tds_get_data: type 38, varint size 1
15:50:13.843633 99259 (token.c:1975):tds_get_data(): wire column size is 4
15:50:13.843643 99259 (token.c:573):1 hidden return parameters
15:50:13.843680 99259 (token.c:510):processing result tokens.  marker
is  fe(DONEPROC)
15:50:13.843692 99259 (token.c:2201):tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
15:50:13.843702 99259 (token.c:2217):tds_process_end() state set to TDS_IDLE
15:50:13.843711 99259 (util.c:162):Changed query state from READING to IDLE
15:50:13.843720 99259 (token.c:2232):                rows_affected = 0
15:50:13.843729 99259 (util.c:110):logic error: cannot change query
state from IDLE to PENDING
15:50:13.843739 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe66c, 0xbfffe668, 0x104)
15:50:13.843749 99259 (token.c:498):tds_process_tokens() state is COMPLETED
15:50:13.843768 99259 (odbc.c:795):SQLNumParams(0x101d740, 0xbfffe79c)
15:50:13.843802 99259 (error.c:609):SQLGetDiagRec(3, 0x101d740, 1,
0xbfffe1de, 0xbfffe1ec, 0xbfffdfde, 512, 0xbfffe1e8)
15:50:13.843814 99259 (error.c:510):_SQLGetDiagRec(3, 0x101d740, 1,
0xbfffe1de, 0xbfffe1ec, 0xbfffdfde, 512, 0xbfffe1e8)
15:50:13.843850 99259 (error.c:609):SQLGetDiagRec(3, 0x101d740, 1,
0xbfffe1de, 0xbfffe1ec, 0xbfffdfde, 512, 0xbfffe1e8)
15:50:13.843867 99259 (error.c:510):_SQLGetDiagRec(3, 0x101d740, 1,
0xbfffe1de, 0xbfffe1ec, 0xbfffdfde, 512, 0xbfffe1e8)
15:50:13.843925 99259 (odbc.c:3848):SQLFreeStmt(0x101d740, 0)
15:50:13.843936 99259 (odbc.c:3769):_SQLFreeStmt(0x101d740, 0, 0)
15:50:13.843947 99259 (odbc.c:3848):SQLFreeStmt(0x101d740, 3)
15:50:13.843956 99259 (odbc.c:3769):_SQLFreeStmt(0x101d740, 3, 0)
15:50:13.843973 99259 (odbc.c:1224):SQLBindParameter(0x101d740, 1, 1,
4, 12, 10, 0, 0x101e68c, 4, 0x101e67c)
15:50:13.843985 99259 (odbc.c:1125):_SQLBindParameter(0x101d740, 1, 1,
4, 12, 10, 0, 0x101e68c, 4, 0x101e67c)
15:50:13.843998 99259 (odbc.c:1224):SQLBindParameter(0x101d740, 2, 4,
4, 12, 0, 0, 0x101eaa0, 32, 0x101e6c4)
15:50:13.844009 99259 (odbc.c:1125):_SQLBindParameter(0x101d740, 2, 4,
4, 12, 0, 0, 0x101eaa0, 32, 0x101e6c4)
15:50:13.844027 99259 (odbc.c:3237):SQLExecute(0x101d740)
15:50:13.844038 99259 (sql2tds.c:150):type=12
15:50:13.844048 99259 (sql2tds.c:156):trace
15:50:13.844087 99259 (sql2tds.c:150):type=12
15:50:13.844098 99259 (sql2tds.c:156):trace
15:50:13.844107 99259 (odbc.c:2965):_SQLExecute(0x101d740)
15:50:13.844117 99259 (odbc.c:2970):_SQLExecute() starting with state 0
15:50:13.844142 99259 (query.c:1768):tds_submit_unprepare() szixd06000
15:50:13.844152 99259 (mem.c:563):tds_free_all_results()
15:50:13.844161 99259 (util.c:162):Changed query state from IDLE to QUERYING
15:50:13.844171 99259 (util.c:162):Changed query state from QUERYING to PENDING
15:50:13.844180 99259 (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   -                        |&......|

15:50:13.844225 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe79c, 0xbfffe798, 0x100)
15:50:13.844237 99259 (util.c:162):Changed query state from PENDING to READING
15:50:13.844543 99259 (net.c:592):Received header
0000 04 01 00 16 00 36 01 00-                        |.....6..|

15:50:13.844573 99259 (net.c:671):Received packet
0000 79 00 00 00 00 fe 00 00-e0 00 00 00 00 00       |y....... ......|

15:50:13.844590 99259 (token.c:510):processing result tokens.  marker
is  79(RETURNSTATUS)
15:50:13.844600 99259 (token.c:510):processing result tokens.  marker
is  fe(DONEPROC)
15:50:13.844610 99259 (token.c:2201):tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
15:50:13.844620 99259 (token.c:2217):tds_process_end() state set to TDS_IDLE
15:50:13.844629 99259 (util.c:162):Changed query state from READING to IDLE
15:50:13.844639 99259 (token.c:2232):                rows_affected = 0
15:50:13.844659 99259 (util.c:110):logic error: cannot change query
state from IDLE to PENDING
15:50:13.844692 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe79c, 0xbfffe798, 0x100)
15:50:13.844703 99259 (token.c:498):tds_process_tokens() state is COMPLETED
15:50:13.844726 99259 (odbc.c:3058):Creating prepared statement
15:50:13.844756 99259 (mem.c:563):tds_free_all_results()
15:50:13.844766 99259 (util.c:162):Changed query state from IDLE to QUERYING
15:50:13.844790 99259 (write.c:136):tds_put_string converting 3 bytes of "@P1"
15:50:13.844801 99259 (write.c:164):tds_put_string wrote 6 bytes
15:50:13.844811 99259 (write.c:136):tds_put_string converting 3 bytes of "@P2"
15:50:13.844821 99259 (write.c:164):tds_put_string wrote 6 bytes
15:50:13.844831 99259 (util.c:162):Changed query state from QUERYING to PENDING
15:50:13.844841 99259 (net.c:779):Sending packet
0000 03 01 00 be 00 00 01 00-ff ff 0b 00 00 00 00 01 |........ ........|
0010 26 04 00 00 00 63 3c 00-00 00 09 04 d0 00 34 3c |&....c<. ......4<|
0020 00 00 00 40 00 50 00 31-00 20 00 56 00 41 00 52 |[email protected] . .V.A.R|
0030 00 43 00 48 00 41 00 52-00 28 00 31 00 30 00 29 |.C.H.A.R .(.1.0.)|
0040 00 2c 00 40 00 50 00 32-00 20 00 56 00 41 00 52 |.,[email protected] . .V.A.R|
0050 00 43 00 48 00 41 00 52-00 28 00 31 00 29 00 00 |.C.H.A.R .(.1.)..|
0060 00 63 46 00 00 00 09 04-d0 00 34 46 00 00 00 65 |.cF..... ..4F...e|
0070 00 78 00 65 00 63 00 20-00 64 00 62 00 6f 00 2e |.x.e.c.  .d.b.o..|
0080 00 75 00 70 00 5f 00 54-00 65 00 73 00 74 00 53 |.u.p._.T .e.s.t.S|
0090 00 50 00 34 00 20 00 40-00 50 00 31 00 2c 00 20 |.P.4. .@ .P.1.,. |
00a0 00 40 00 50 00 32 00 20-00 4f 00 55 00 54 00 50 |[email protected].  .O.U.T.P|
00b0 00 55 00 54 00 00 00 26-04 04 01 00 00 00       |.U.T...& ......|

15:50:13.844977 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe7bc, 0xbfffe7b8, 0x100)
15:50:13.844992 99259 (util.c:162):Changed query state from PENDING to READING
15:50:13.846689 99259 (net.c:592):Received header
0000 04 01 00 2f 00 36 01 00-                        |.../.6..|

15:50:13.846730 99259 (net.c:671):Received packet
0000 ff 01 00 e0 00 00 00 00-00 79 f6 1f 00 00 ac 0d |........ .y......|
0010 00 00 01 00 00 00 00 26-04 04 02 00 00 00 fe 00 |.......& ........|
0020 00 e0 00 00 00 00 00   -                        |.......|

15:50:13.846759 99259 (token.c:510):processing result tokens.  marker
is  ff(DONEINPROC)
15:50:13.846769 99259 (token.c:2201):tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 0
15:50:13.846779 99259 (token.c:2232):                rows_affected = 0
15:50:13.846789 99259 (token.c:510):processing result tokens.  marker
is  79(RETURNSTATUS)
15:50:13.846799 99259 (token.c:510):processing result tokens.  marker
is  ac(PARAM)
15:50:13.846808 99259 (token.c:567):processing parameters for sp 11
15:50:13.846817 99259 (token.c:569):calling tds_process_param_result
15:50:13.846826 99259
(token.c:1198):tds_process_param_result(0x101dd90, 0xbfffe76c)
15:50:13.846839 99259 (token.c:1596):processing result. type =
38(integer-null), varint_size 1
15:50:13.846849 99259 (token.c:1617):processing result. column_size 4
15:50:13.846859 99259 (token.c:1915):tds_get_data: type 38, varint size 1
15:50:13.846868 99259 (token.c:1975):tds_get_data(): wire column size is 4
15:50:13.846878 99259 (token.c:573):1 hidden return parameters
15:50:13.846889 99259 (token.c:510):processing result tokens.  marker
is  fe(DONEPROC)
15:50:13.846899 99259 (token.c:2201):tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
15:50:13.846909 99259 (token.c:2217):tds_process_end() state set to TDS_IDLE
15:50:13.846918 99259 (util.c:162):Changed query state from READING to IDLE
15:50:13.846928 99259 (token.c:2232):                rows_affected = 0
15:50:13.846937 99259 (util.c:110):logic error: cannot change query
state from IDLE to PENDING
15:50:13.846947 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe7bc, 0xbfffe7b8, 0x100)
15:50:13.846957 99259 (token.c:498):tds_process_tokens() state is COMPLETED
15:50:13.846966 99259 (odbc.c:3078):End prepare, execute
15:50:13.846997 99259 (query.c:1631):tds_submit_execute()
15:50:13.847007 99259 (mem.c:563):tds_free_all_results()
15:50:13.847017 99259 (util.c:162):Changed query state from IDLE to QUERYING
15:50:13.847028 99259 (query.c:1326):tds_put_data_info putting status
15:50:13.847037 99259 (query.c:1420):tds_put_data: colsize = 1
15:50:13.847087 99259 (query.c:1449):tds_put_data: not null param
varint_size = 2
15:50:13.847155 99259 (query.c:1326):tds_put_data_info putting status
15:50:13.847165 99259 (query.c:1420):tds_put_data: colsize = -1
15:50:13.847175 99259 (query.c:1423):tds_put_data: null param
15:50:13.847184 99259 (util.c:162):Changed query state from QUERYING to PENDING
15:50:13.847194 99259 (net.c:779):Sending packet
0000 03 01 00 42 00 00 01 00-0a 00 73 00 70 00 5f 00 |...B.... ..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 02 00 00-00 00 00 a7 0a 00 09 04 |..&..... ........|
0030 d0 00 34 01 00 31 00 01-a7 01 00 09 04 d0 00 34 |..4..1.. .......4|
0040 ff ff                  -                        |..|

15:50:13.847312 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe7ac, 0xbfffe7a8, 0x6914)
15:50:13.847327 99259 (util.c:162):Changed query state from PENDING to READING
15:50:13.848129 99259 (net.c:592):Received header
0000 04 01 01 58 00 36 01 00-                        |...X.6..|

15:50:13.848166 99259 (net.c:671):Received packet
0000 aa 2c 01 e2 1f 00 00 02-10 78 00 54 00 68 00 65 |.,...... .x.T.h.e|
0010 00 20 00 66 00 6f 00 72-00 6d 00 61 00 6c 00 20 |. .f.o.r .m.a.l. |
0020 00 70 00 61 00 72 00 61-00 6d 00 65 00 74 00 65 |.p.a.r.a .m.e.t.e|
0030 00 72 00 20 00 22 00 40-00 50 00 32 00 22 00 20 |.r. .".@ .P.2.". |
0040 00 77 00 61 00 73 00 20-00 6e 00 6f 00 74 00 20 |.w.a.s.  .n.o.t. |
0050 00 64 00 65 00 63 00 6c-00 61 00 72 00 65 00 64 |.d.e.c.l .a.r.e.d|
0060 00 20 00 61 00 73 00 20-00 61 00 6e 00 20 00 4f |. .a.s.  .a.n. .O|
0070 00 55 00 54 00 50 00 55-00 54 00 20 00 70 00 61 |.U.T.P.U .T. .p.a|
0080 00 72 00 61 00 6d 00 65-00 74 00 65 00 72 00 2c |.r.a.m.e .t.e.r.,|
0090 00 20 00 62 00 75 00 74-00 20 00 74 00 68 00 65 |. .b.u.t . .t.h.e|
00a0 00 20 00 61 00 63 00 74-00 75 00 61 00 6c 00 20 |. .a.c.t .u.a.l. |
00b0 00 70 00 61 00 72 00 61-00 6d 00 65 00 74 00 65 |.p.a.r.a .m.e.t.e|
00c0 00 72 00 20 00 70 00 61-00 73 00 73 00 65 00 64 |.r. .p.a .s.s.e.d|
00d0 00 20 00 69 00 6e 00 20-00 72 00 65 00 71 00 75 |. .i.n.  .r.e.q.u|
00e0 00 65 00 73 00 74 00 65-00 64 00 20 00 6f 00 75 |.e.s.t.e .d. .o.u|
00f0 00 74 00 70 00 75 00 74-00 2e 00 18 43 00 48 00 |.t.p.u.t ....C.H.|
0100 52 00 49 00 53 00 48 00-41 00 4c 00 4c 00 34 00 |R.I.S.H. A.L.L.4.|
0110 44 00 34 00 39 00 5c 00-53 00 51 00 4c 00 45 00 |D.4.9.\. S.Q.L.E.|
0120 58 00 50 00 52 00 45 00-53 00 53 00 00 01 00 79 |X.P.R.E. S.S....y|
0130 01 00 00 00 ac 10 00 00-01 00 00 00 00 a7 01 00 |........ ........|
0140 09 04 d0 00 34 ff ff fe-02 00 e0 00 00 00 00 00 |....4... ........|

15:50:13.848334 99259 (token.c:510):processing result tokens.  marker
is  aa(ERROR)
15:50:13.848348 99259 (token.c:108):tds_process_default_tokens()
marker is aa(ERROR)
15:50:13.848359 99259 (token.c:2451):tds_process_msg() reading message
from server
15:50:13.848375 99259 (token.c:2516):tds_process_msg() calling client
msg handler
15:50:13.848384 99259 (odbc.c:2032):msgno 8162 20003
15:50:13.848398 99259 (token.c:2529):tds_process_msg() returning TDS_SUCCEED
15:50:13.848408 99259 (token.c:510):processing result tokens.  marker
is  79(RETURNSTATUS)
15:50:13.848418 99259 (token.c:510):processing result tokens.  marker
is  ac(PARAM)
15:50:13.848428 99259 (token.c:567):processing parameters for sp 12
15:50:13.848437 99259 (token.c:569):calling tds_process_param_result
15:50:13.848446 99259
(token.c:1198):tds_process_param_result(0x101dd90, 0xbfffe71c)
15:50:13.848457 99259 (token.c:1596):processing result. type =
39(varchar), varint_size 2
15:50:13.848467 99259 (token.c:1617):processing result. column_size 1
15:50:13.848493 99259 (token.c:3294):adjust_character_column_size:
	Server charset: CP1252
	Server column_size: 1
	Client charset: ISO-8859-1
	Client column_size: 1
15:50:13.848505 99259 (token.c:1915):tds_get_data: type 39, varint size 2
15:50:13.848514 99259 (token.c:1975):tds_get_data(): wire column size is -1
15:50:13.848523 99259 (token.c:573):1 hidden return parameters
15:50:13.848534 99259 (token.c:510):processing result tokens.  marker
is  fe(DONEPROC)
15:50:13.848564 99259 (token.c:2201):tds_process_end: more_results = 0
		was_cancelled = 0
		error = 1
		done_count_valid = 0
15:50:13.848575 99259 (token.c:2217):tds_process_end() state set to TDS_IDLE
15:50:13.848584 99259 (util.c:162):Changed query state from READING to IDLE
15:50:13.848594 99259 (token.c:2232):                rows_affected = 0
15:50:13.848603 99259 (util.c:110):logic error: cannot change query
state from IDLE to PENDING
15:50:13.848612 99259 (odbc.c:3269):odbc_process_tokens:
tds_process_tokens returned 1
15:50:13.848628 99259 (odbc.c:3270):    result_type=4053,
TDS_DONE_COUNT=0, TDS_DONE_ERROR=2
15:50:13.848639 99259 (odbc.c:3310):odbc_process_tokens: row_count=-1
15:50:13.848648 99259 (odbc.c:3119):_SQLExecute: odbc_process_tokens
returned result_type 4053
15:50:13.848668 99259 (error.c:609):SQLGetDiagRec(3, 0x101d740, 1,
0xbfffe85e, 0xbfffe86c, 0xbfffe65e, 512, 0xbfffe868)
15:50:13.848679 99259 (error.c:510):_SQLGetDiagRec(3, 0x101d740, 1,
0xbfffe85e, 0xbfffe86c, 0xbfffe65e, 512, 0xbfffe868)
15:50:13.848699 99259 (error.c:609):SQLGetDiagRec(3, 0x101d740, 2,
0xbfffe85e, 0xbfffe86c, 0xbfffe65e, 512, 0xbfffe868)
15:50:13.848710 99259 (error.c:510):_SQLGetDiagRec(3, 0x101d740, 2,
0xbfffe85e, 0xbfffe86c, 0xbfffe65e, 512, 0xbfffe868)
15:50:13.848749 99259 (odbc.c:3680):SQLFreeHandle(3, 0x0x101d740)
15:50:13.848761 99259 (odbc.c:3769):_SQLFreeStmt(0x101d740, 1, 0)
15:50:13.848772 99259 (query.c:1768):tds_submit_unprepare() szixd09000
15:50:13.848782 99259 (mem.c:563):tds_free_all_results()
15:50:13.848791 99259 (util.c:162):Changed query state from IDLE to QUERYING
15:50:13.848801 99259 (util.c:162):Changed query state from QUERYING to PENDING
15:50:13.848811 99259 (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   -                        |&......|

15:50:13.848887 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe78c, 0xbfffe788, 0x100)
15:50:13.848924 99259 (util.c:162):Changed query state from PENDING to READING
15:50:13.849398 99259 (net.c:592):Received header
0000 04 01 00 16 00 36 01 00-                        |.....6..|

15:50:13.849429 99259 (net.c:671):Received packet
0000 79 e2 1f 00 00 fe 00 00-e0 00 00 00 00 00       |y....... ......|

15:50:13.849446 99259 (token.c:510):processing result tokens.  marker
is  79(RETURNSTATUS)
15:50:13.849456 99259 (token.c:510):processing result tokens.  marker
is  fe(DONEPROC)
15:50:13.849466 99259 (token.c:2201):tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
15:50:13.849476 99259 (token.c:2217):tds_process_end() state set to TDS_IDLE
15:50:13.849485 99259 (util.c:162):Changed query state from READING to IDLE
15:50:13.849494 99259 (token.c:2232):                rows_affected = 0
15:50:13.849503 99259 (util.c:110):logic error: cannot change query
state from IDLE to PENDING
15:50:13.849513 99259 (token.c:495):tds_process_tokens(0x101dd90,
0xbfffe78c, 0xbfffe788, 0x100)
15:50:13.849523 99259 (token.c:498):tds_process_tokens() state is COMPLETED
15:50:13.849729 99259 (odbc.c:2005):SQLDisconnect(0x802a00)
15:50:13.849754 99259 (mem.c:563):tds_free_all_results()
15:50:13.850072 99259 (util.c:162):Changed query state from IDLE to DEAD
15:50:13.850239 99259 (odbc.c:3680):SQLFreeHandle(2, 0x0x802a00)
15:50:13.850252 99259 (odbc.c:3706):_SQLFreeConnect(0x802a00)
15:50:13.850264 99259 (odbc.c:3680):SQLFreeHandle(1, 0x0x101d6e0)
15:50:13.850275 99259 (odbc.c:3744):_SQLFreeEnv(0x101d6e0)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.