Program type out of range
Hegedűs Gábor <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <1269277230.3071.11.camel@hegedus> |
Hello Colleagues, Here is a new example resulting error “Program type out of range”. (Thanks again for solution of conversion problem to James K. Lowden.) I have a MSSQL 2000 database and use it via ODBC (with.no problem in Win XP). Now I try to access it from Ubuntu 2.6.31-20 (English), Wine1.2 (1.1.40-0ubuntu1; XP), unixodbc (2.2.11-16ubuntu1), freetds-0.82 (freetds-stable 2009.12.11). After successful connection and "use <db>" command I sent “select top 1 * from jog” to unixodbc (table jog has 4 records). It failed and generated the listed messages in the log files. freetdes got the correct record from MS SQL, but couldn't finish the process. Have you idea about reason and solution? Thank you Gábor The main settings: /etc/odbcinst.ini: [ODBC] Trace = yes Tracefile = /tmp/odbc.log ForceTrace = Yes [mssql_tds] Description = MSSQL driver Driver = /usr/local/lib/libtdsodbc.so Driver64 = Setup = /usr/lib/odbc/libtdsS.so Setup64 = UsageCount = 2 CPTimeout = CPReuse = /etc/odbc.ini: [MSSQL] Description = mssql_tds Driver = mssql_tds servername = mssql_tds Port = 1433 Trace = Yes TraceFile = /tmp/odbc.log /usr/local/etc/freetds.conf (active lines) [global] tds version = 8.0 client charset = UTF-8 dump file = /tmp/freetds.log dump file append = yes debug flags = 0xffff debug level = 10 text size = 64512 [mssql_tds] host = 192.168.1.65 port = 1433 tds version = 8.0 client charset = UTF-8 The results: odbc.log [ODBC][2711][SQLFreeStmt.c][140] Entry: Statement = 0x7d6404a8 Option = 1 [ODBC][2711][SQLFreeHandle.c][365] Entry: Handle Type = 3 Input Handle = 0x7d6404a8 [ODBC][2711][SQLFreeHandle.c][462] Exit:[SQL_SUCCESS] [ODBC][2711][SQLAllocHandle.c][510] Entry: Handle Type = 3 Input Handle = 0x7d629f38 [ODBC][2711][SQLAllocHandle.c][872] Exit:[SQL_SUCCESS] Output Handle = 0x7d6404a8 [ODBC][2711][SQLExecDirectW.c][135] Entry: Statement = 0x7d6404a8 SQL = [select top 1 * from jog][length = 23 (SQL_NTS)] [ODBC][2711][SQLExecDirectW.c][393] Exit:[SQL_SUCCESS] [ODBC][2711][SQLNumResultCols.c][149] Entry: Statement = 0x7d6404a8 Column Count = 0x10107776 [ODBC][2711][SQLNumResultCols.c][234] Exit:[SQL_SUCCESS] Count = 0x10107776 -> 2 [ODBC][2711][SQLDescribeColW.c][155] Entry: Statement = 0x7d6404a8 Column Number = 1 Column Name = 0x10147fc0 Buffer Length = 120 Name Length = 0x10107720 Data Type = 0x10107b98 Column Size = 0x1000730c Decimal Digits = 0x10147fb0 Nullable = 0x10007310 [ODBC][2711][SQLDescribeColW.c][398] Exit:[SQL_SUCCESS] Column Name = [j] Data Type = 0x10107b98 -> 4 Column Size = 0x1000730c -> 10 Decimal Digits = 0x10147fb0 -> 0 Nullable = 0x10007310 -> 0 [ODBC][2711][SQLBindCol.c][165] Entry: Statement = 0x7d6404a8 Column Number = 1 Target Type = -8 SQL_WCHAR Target Value = 0x10007720 Buffer Length = 50 StrLen Or Ind = 0x10107ba4 [ODBC][2711][SQLBindCol.c][251] Exit:[SQL_ERROR] DIAG [S1003] [FreeTDS][SQL Server]Program type out of range freetds.log 21:44:40.325279 2711 (write.c:136):tds_put_string converting 23 bytes of "select top 1 * from jog" 21:44:40.325313 2711 (write.c:164):tds_put_string wrote 46 bytes 21:44:40.325340 2711 (util.c:162):Changed query state from QUERYING to PENDING 21:44:40.325368 2711 (net.c:779):Sending packet 0000 01 01 00 36 00 00 01 00-73 00 65 00 6c 00 65 00 |...6.... s.e.l.e.| 0010 63 00 74 00 20 00 74 00-6f 00 70 00 20 00 31 00 |c.t. .t. o.p. .1.| 0020 20 00 2a 00 20 00 66 00-72 00 6f 00 6d 00 20 00 | .*. .f. r.o.m. .| 0030 6a 00 6f 00 67 00 - |j.o.g.| 21:44:40.325535 2711 (token.c:495):tds_process_tokens(0x7d63bbb0, 0x32fb70, 0x32fb6c, 0x6914) 21:44:40.325574 2711 (util.c:162):Changed query state from PENDING to READING 21:44:40.443501 2711 (net.c:592):Received header 0000 04 01 00 52 00 33 01 00- |...R.3..| 21:44:40.443614 2711 (net.c:671):Received packet 0000 81 02 00 00 00 08 00 38-06 6a 00 5f 00 61 00 7a |.......8 .j._.a.z| 0010 00 6f 00 6e 00 00 00 08-00 a7 20 00 0e 04 d0 00 |.o.n.... .. .....| 0020 00 05 6a 00 5f 00 6e 00-65 00 76 00 d1 01 00 00 |..j._.n. e.v.....| 0030 00 0e 00 61 64 6d 69 6e-69 73 7a 74 72 e1 74 6f |...admin isztr.to| 0040 72 fd 10 00 c1 00 01 00-00 00 |r....... ..| 21:44:40.443729 2711 (token.c:510):processing result tokens. marker is 81(TDS7_RESULT) 21:44:40.443758 2711 (token.c:1520):processing TDS7 result metadata. 21:44:40.443784 2711 (mem.c:563):tds_free_all_results() 21:44:40.443815 2711 (token.c:1544):set current_results (2 columns) to tds->res_info 21:44:40.443843 2711 (token.c:1555):setting up column 0 21:44:40.443877 2711 (token.c:1490):tds7_get_data_info: colname = j_azon (6 bytes) type = 56 (int) server's type = 56 (int) column_varint_size = 0 column_size = 4 (4 on server) 21:44:40.443910 2711 (token.c:1555):setting up column 1 21:44:40.443938 2711 (token.c:3294):adjust_character_column_size: Server charset: CP1250 Server column_size: 32 Client charset: UTF-8 Client column_size: 128 21:44:40.443968 2711 (token.c:1490):tds7_get_data_info: colname = j_nev (5 bytes) type = 39 (varchar) server's type = 167 (xvarchar) column_varint_size = 2 column_size = 128 (32 on server) 21:44:40.444055 2711 (util.c:162):Changed query state from READING to PENDING 21:44:40.444084 2711 (odbc.c:3269):odbc_process_tokens: tds_process_tokens returned 1 21:44:40.444109 2711 (odbc.c:3270): result_type=4049, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0 21:44:40.444174 2711 (odbc.c:3340):odbc_process_tokens: returning result_type 4049 21:44:40.444201 2711 (odbc.c:3119):_SQLExecute: odbc_process_tokens returned result_type 4049 21:44:40.444226 2711 (token.c:495):tds_process_tokens(0x7d63bbb0, 0x32fb70, 0x32fb6c, 0x6914) 21:44:40.444254 2711 (util.c:162):Changed query state from PENDING to READING 21:44:40.444279 2711 (token.c:510):processing result tokens. marker is d1(ROW) 21:44:40.444305 2711 (token.c:621):tds_process_tokens::SET_RETURN stopping on current token 21:44:40.444330 2711 (util.c:162):Changed query state from READING to PENDING 21:44:40.444355 2711 (odbc.c:3269):odbc_process_tokens: tds_process_tokens returned 1 21:44:40.444380 2711 (odbc.c:3270): result_type=4040, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0 21:44:40.444405 2711 (odbc.c:3340):odbc_process_tokens: returning result_type 4040 21:44:40.444430 2711 (odbc.c:3119):_SQLExecute: odbc_process_tokens returned result_type 4040 21:44:40.444657 2711 (odbc.c:4100):SQLNumResultCols(0x7d640ef8, 0x10107776) 21:44:40.444839 2711 (odbc.c:1702):SQLDescribeCol(0x7d640ef8, 1, 0x7d641150, 120, 0x10107720, 0x10107b98, 0x1000730c, 0x10147fb0, 0x10007310) 21:44:40.445042 2711 (odbc.c:1519):SQLBindCol(0x7d640ef8, 1, -8, 0x10007720, 50, 0x10107ba4) 21:44:40.445157 2711 (error.c:609):SQLGetDiagRec(3, 0x7d640ef8, 1, 0x32f76e, 0x32f77c, 0x32f9a0, 512, 0x32f778) 21:44:40.445194 2711 (error.c:510):_SQLGetDiagRec(3, 0x7d640ef8, 1, 0x32f76e, 0x32f77c, 0x32f9a0, 512, 0x32f778) 21:44:40.445304 2711 (error.c:609):SQLGetDiagRec(3, 0x7d640ef8, 2, 0x32f76e, 0x32f77c, 0x32f9a0, 512, 0x32f778) 21:44:40.445340 2711 (error.c:510):_SQLGetDiagRec(3, 0x7d640ef8, 2, 0x32f76e, 0x32f77c, 0x32f9a0, 512, 0x32f778) 21:44:40.445448 2711 (odbc.c:1702):SQLDescribeCol(0x7d640ef8, 2, 0x7d641218, 120, 0x10107720, 0x10107b98, 0x1000730c, 0x10147fb0, 0x10007310) 21:44:40.445641 2711 (odbc.c:1519):SQLBindCol(0x7d640ef8, 2, -8, 0x10007794, 168, 0x10107ba8) 21:44:40.445753 2711 (error.c:609):SQLGetDiagRec(3, 0x7d640ef8, 1, 0x32f76e, 0x32f77c, 0x32f9a0, 512, 0x32f778) 21:44:40.445789 2711 (error.c:510):_SQLGetDiagRec(3, 0x7d640ef8, 1, 0x32f76e, 0x32f77c, 0x32f9a0, 512, 0x32f778) 21:44:40.445893 2711 (error.c:609):SQLGetDiagRec(3, 0x7d640ef8, 2, 0x32f76e, 0x32f77c, 0x32f9a0, 512, 0x32f778) 21:44:40.445927 2711 (error.c:510):_SQLGetDiagRec(3, 0x7d640ef8, 2, 0x32f76e, 0x32f77c, 0x32f9a0, 512, 0x32f778) 21:44:40.446240 2711 (odbc.c:3680):SQLFreeHandle(3, 0x0x7d63e780) 21:44:40.446276 2711 (odbc.c:3769):_SQLFreeStmt(0x7d63e780, 1, 0) ----- After the error message I was thinking about the next steps ----- 21:48:02.373755 2711 (odbc.c:3680):SQLFreeHandle(3, 0x0x7d640ef8) 21:48:02.373822 2711 (odbc.c:3769):_SQLFreeStmt(0x7d640ef8, 1, 0) 21:48:02.373861 2711 (query.c:1934):tds_send_cancel: not in_cancel and not idle 21:48:02.373896 2711 (query.c:1943):tds_send_cancel: sending cancel packet 21:48:02.373930 2711 (net.c:779):Sending packet 0000 06 01 00 08 00 00 01 00- |........| _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds