[freetds] FreeTDS with Wine Issue

Chad Sikorra chad.sikorra at gmail.com
Fri May 16 17:01:30 EDT 2008


Hi,

I'm trying to use FreeTDS with Wine 1.0 RC1 to run an application called
HEAT which connects via ODBC to a box using SQL Server 2005. We use it for
logging tickets in our IT Department. Anways, I'm trying to figure out if
the issue I'm having is a Wine issue or a FreeTDS issue. I configured a
system DSN via ODBCConfig and I tested basic connectivity with the isql
command and it connects fine. So I setup my application to use that DSN.
When I launch the application and it attempts to connect using that DSN I
receive the following error message...

--------
SL009

No columns were bound prior to calling SQLFetch or SQLFetchScroll

Last SQL String:
select Status from Tracker where Status > 0

Last ODBC Command:
Function: SQLFetch
--------

So it seems like it connects to the database fine, but then it bombs out
with that above message. I set the environment variable TDSDUMP to get a log
file, and this is what it contains (slightly modified to remove login
processing/servername)...

freetds.log
--------
08:56:28.942539 Starting log file for FreeTDS 0.63
    on 2008-05-06 08:56:28 with debug level 99.
08:56:28.942570 iconv to convert client-side data to the "UTF-8" character
set
08:56:28.942607 tds_iconv_info_init: converting "UTF-8"->"UCS-2LE"
08:56:28.942634 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
08:56:28.942650 Connecting to <serverip> port 1433, TDS 8.0.
08:56:28.943622 tds_put_string converting 11 bytes of "csikorra-hh"
08:56:28.943640 tds_put_string wrote 22 bytes
08:56:28.943651 tds_put_string converting 4 bytes of "db"
08:56:28.943663 tds_put_string wrote 8 bytes
08:56:28.943674 tds_put_string wrote 0 bytes
08:56:28.943685 tds_put_string converting 4 bytes of "db"
08:56:28.943696 tds_put_string wrote 8 bytes
08:56:28.943706 tds_put_string wrote 0 bytes
08:56:28.943716 tds_put_string converting 10 bytes of "us_english"
08:56:28.943727 tds_put_string wrote 20 bytes
08:56:28.943738 tds_put_string converting 4 bytes of "db"
08:56:28.943749 tds_put_string wrote 8 bytes
08:56:28.943773 tds_process_login_tokens()

...

08:56:29.078649 leaving tds_process_login_tokens() returning 1
08:56:29.078670 tds_free_all_results()
08:56:29.078689 tds_put_string converting 19 bytes of "set textsize 64512 "
08:56:29.078711 tds_put_string wrote 38 bytes
08:56:29.078729 Sending packet
0000 01 01 00 2e 00 00 01 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. .|

08:56:29.079522 Received header
0000 04 01 00 11 00 43 01 00-                        |.....C..|

08:56:29.079551 Received packet
0000 fd 00 00 be 00 00 00 00-00                      |........ .|

08:56:29.079572 processing result tokens.  marker is  fd(DONE)
08:56:29.079591 tds_process_end: more_results = 0
        was_cancelled = 0
        error = 0
        done_count_valid = 0
08:56:29.079611 tds_process_end() state set to TDS_IDLE
08:56:29.079632 tds_process_result_tokens() state is COMPLETED
08:56:29.079657 SQLGetFunctions: fFunction is 1
08:56:29.079676 SQLGetFunctions: fFunction is 2
08:56:29.079693 SQLGetFunctions: fFunction is 1001
08:56:29.079711 SQLGetFunctions: fFunction is 3
08:56:29.079728 SQLGetFunctions: fFunction is 4
08:56:29.079745 SQLGetFunctions: fFunction is 1002
08:56:29.079762 SQLGetFunctions: fFunction is 72
08:56:29.079780 SQLGetFunctions: fFunction is 5
08:56:29.079797 SQLGetFunctions: fFunction is 1003
08:56:29.079814 SQLGetFunctions: fFunction is 6
08:56:29.079831 SQLGetFunctions: fFunction is 6
08:56:29.079848 SQLGetFunctions: fFunction is 56
08:56:29.079865 SQLGetFunctions: fFunction is 40
08:56:29.079882 SQLGetFunctions: fFunction is 7
08:56:29.079899 SQLGetFunctions: fFunction is 1004
08:56:29.079917 SQLGetFunctions: fFunction is 8
08:56:29.079934 SQLGetFunctions: fFunction is 9
08:56:29.079951 SQLGetFunctions: fFunction is 41
08:56:29.079968 SQLGetFunctions: fFunction is 1005
08:56:29.079985 SQLGetFunctions: fFunction is 10
08:56:29.080002 SQLGetFunctions: fFunction is 11
08:56:29.080019 SQLGetFunctions: fFunction is 12
08:56:29.080036 SQLGetFunctions: fFunction is 13
08:56:29.080073 SQLGetFunctions: fFunction is 1021
08:56:29.080092 SQLGetFunctions: fFunction is 60
08:56:29.080109 SQLGetFunctions: fFunction is 15
08:56:29.080126 SQLGetFunctions: fFunction is 1006
08:56:29.080143 SQLGetFunctions: fFunction is 16
08:56:29.080161 SQLGetFunctions: fFunction is 14
08:56:29.080178 SQLGetFunctions: fFunction is 1007
08:56:29.080194 SQLGetFunctions: fFunction is 42
08:56:29.080211 SQLGetFunctions: fFunction is 17
08:56:29.080228 SQLGetFunctions: fFunction is 43
08:56:29.080245 SQLGetFunctions: fFunction is 1008
08:56:29.080262 SQLGetFunctions: fFunction is 1009
08:56:29.080279 SQLGetFunctions: fFunction is 1010
08:56:29.080296 SQLGetFunctions: fFunction is 1012
08:56:29.080313 SQLGetFunctions: fFunction is 44
08:56:29.080330 SQLGetFunctions: fFunction is 45
08:56:29.080347 SQLGetFunctions: fFunction is 1014
08:56:29.080364 SQLGetFunctions: fFunction is 46
08:56:29.080382 SQLGetFunctions: fFunction is 47
08:56:29.080399 SQLGetFunctions: fFunction is 61
08:56:29.080416 SQLGetFunctions: fFunction is 62
08:56:29.080433 SQLGetFunctions: fFunction is 63
08:56:29.080449 SQLGetFunctions: fFunction is 18
08:56:29.080466 SQLGetFunctions: fFunction is 48
08:56:29.080483 SQLGetFunctions: fFunction is 64
08:56:29.080500 SQLGetFunctions: fFunction is 19
08:56:29.080518 SQLGetFunctions: fFunction is 65
08:56:29.080553 SQLGetFunctions: fFunction is 66
08:56:29.080572 SQLGetFunctions: fFunction is 67
08:56:29.080590 SQLGetFunctions: fFunction is 49
08:56:29.080607 SQLGetFunctions: fFunction is 20
08:56:29.080624 SQLGetFunctions: fFunction is 1016
08:56:29.080641 SQLGetFunctions: fFunction is 50
08:56:29.080658 SQLGetFunctions: fFunction is 21
08:56:29.080675 SQLGetFunctions: fFunction is 1017
08:56:29.080693 SQLGetFunctions: fFunction is 1018
08:56:29.080710 SQLGetFunctions: fFunction is 1019
08:56:29.080727 SQLGetFunctions: fFunction is 22
08:56:29.080744 SQLGetFunctions: fFunction is 1020
08:56:29.080762 SQLGetFunctions: fFunction is 51
08:56:29.080779 SQLGetFunctions: fFunction is 52
08:56:29.080796 SQLGetFunctions: fFunction is 53
08:56:29.080813 SQLGetFunctions: fFunction is 70
08:56:29.080831 SQLGetFunctions: fFunction is 54
08:56:29.080848 SQLGetFunctions: fFunction is 23
08:56:29.080865 SQLGetFunctions: fFunction is 1011
08:56:29.081106 tds_free_all_results()
08:56:29.081130 tds_put_string converting 43 bytes of "select Status from
Tracker where Status > 0"
08:56:29.081153 tds_put_string wrote 86 bytes
08:56:29.081172 Sending packet
0000 01 01 00 5e 00 00 01 00-73 00 65 00 6c 00 65 00 |...^.... s.e.l.e.|
0010 63 00 74 00 20 00 53 00-74 00 61 00 74 00 75 00 |c.t. .S. t.a.t.u.|
0020 73 00 20 00 66 00 72 00-6f 00 6d 00 20 00 54 00 |s. .f.r. o.m. .T.|
0030 72 00 61 00 63 00 6b 00-65 00 72 00 20 00 77 00 |r.a.c.k. e.r. .w.|
0040 68 00 65 00 72 00 65 00-20 00 53 00 74 00 61 00 |h.e.r.e.  .S.t.a.|
0050 74 00 75 00 73 00 20 00-3e 00 20 00 30 00       |t.u.s. . >. .0.|

08:56:29.082523 Received header
0000 04 01 00 39 00 43 01 00-                        |...9.C..|

08:56:29.082553 Received packet
0000 81 01 00 00 00 09 00 26-04 06 53 00 74 00 61 00 |.......& ..S.t.a.|
0010 74 00 75 00 73 00 d1 04-4d 00 00 00 d1 04 48 00 |t.u.s... M.....H.|
0020 00 00 d1 04 7c 00 00 00-fd 10 00 c1 00 03 00 00 |....|... ........|
0030 00                     -                        |.|

08:56:29.082609 processing result tokens.  marker is  81(TDS7_RESULT)
08:56:29.082629 tds_free_all_results()
08:56:29.082649 processing TDS7 result. set current_results to tds->res_info
08:56:29.082670 tds_get_string: reading 12 from wire to give 6 to client.
08:56:29.082692 tds7_get_data_info:1558:
    colname = Status (6 bytes)
    type = 38 (integer-null)
    server's type = 38 (integer-null)
    column_varint_size = 1
    column_size = 4 (4 on server)
08:56:29.082718 processing result tokens.  marker is  d1(ROW)
08:56:35.828772 SQLFreeHandle(3, 0x0x7c1433f8)
08:56:35.828831 Sending packet
0000 06 01 00 08 00 00 01 00-                        |........|

08:56:35.828901 tds_process_default_tokens() marker is d1(ROW)
08:56:35.828925 processing row.  column is 0 varint size = 1
08:56:35.828945 processing row.  column size is 4
08:56:35.828963 clearing column 0 NULL bit
08:56:35.828982 tds_process_default_tokens() marker is d1(ROW)
08:56:35.829010 processing row.  column is 0 varint size = 1
08:56:35.829029 processing row.  column size is 4
08:56:35.829059 clearing column 0 NULL bit
08:56:35.829078 tds_process_default_tokens() marker is d1(ROW)
08:56:35.829096 processing row.  column is 0 varint size = 1
08:56:35.829114 processing row.  column size is 4
08:56:35.829132 clearing column 0 NULL bit
08:56:35.829150 tds_process_end: more_results = 0
        was_cancelled = 0
        error = 0
        done_count_valid = 1
08:56:35.829170 tds_process_end() state set to TDS_IDLE
08:56:35.829188                 rows_affected = 3
08:56:35.830165 Received header
0000 04 01 00 11 00 43 01 00-                        |.....C..|

08:56:35.830209 Received packet
0000 fd 20 00 fd 00 00 00 00-00                      |. ...... .|

08:56:35.830231 tds_process_end: more_results = 0
        was_cancelled = 1
        error = 0
        done_count_valid = 0
08:56:35.830259 tds_process_end() state set to TDS_IDLE
08:56:35.830358 SQLFreeHandle(3, 0x0x7c109428)
08:56:35.830382 Sending packet
0000 06 01 00 08 00 00 01 00-                        |........|

08:56:35.830428 tds_process_end: more_results = 0
        was_cancelled = 0
        error = 0
        done_count_valid = 1
08:56:35.830487 tds_process_end() state set to TDS_IDLE
08:56:35.830507                 rows_affected = 1
08:56:35.831004 Received header
0000 04 01 00 11 00 42 01 00-                        |.....B..|

08:56:35.831038 Received packet
0000 fd 20 00 fd 00 00 00 00-00                      |. ...... .|

08:56:35.831059 tds_process_end: more_results = 0
        was_cancelled = 1
        error = 0
        done_count_valid = 0
08:56:35.831080 tds_process_end() state set to TDS_IDLE
08:56:35.831686 tds_free_all_results()
08:56:35.831715 tds_put_string converting 51 bytes of "Select HEATSchema
>From HEATDb Where DbName = 'HEAT'"
08:56:35.831743 tds_put_string wrote 102 bytes
08:56:35.831762 Sending packet
0000 01 01 00 6e 00 00 01 00-53 00 65 00 6c 00 65 00 |...n.... S.e.l.e.|
0010 63 00 74 00 20 00 48 00-45 00 41 00 54 00 53 00 |c.t. .H. E.A.T.S.|
0020 63 00 68 00 65 00 6d 00-61 00 20 00 46 00 72 00 |c.h.e.m. a. .F.r.|
0030 6f 00 6d 00 20 00 48 00-45 00 41 00 54 00 44 00 |o.m. .H. E.A.T.D.|
0040 62 00 20 00 57 00 68 00-65 00 72 00 65 00 20 00 |b. .W.h. e.r.e. .|
0050 44 00 62 00 4e 00 61 00-6d 00 65 00 20 00 3d 00 |D.b.N.a. m.e. .=.|
0060 20 00 27 00 48 00 45 00-41 00 54 00 27 00       | .'.H.E. A.T.'.|

08:56:35.832999 Received header
0000 04 01 00 35 00 42 01 00-                        |...5.B..|

08:56:35.833038 Received packet
0000 81 01 00 00 00 09 00 26-04 0a 48 00 45 00 41 00 |.......& ..H.E.A.|
0010 54 00 53 00 63 00 68 00-65 00 6d 00 61 00 d1 04 |T.S.c.h. e.m.a...|
0020 da 20 00 00 fd 10 00 c1-00 01 00 00 00          |. ...... .....|

08:56:35.833108 processing result tokens.  marker is  81(TDS7_RESULT)
08:56:35.833136 tds_free_all_results()
08:56:35.833159 processing TDS7 result. set current_results to tds->res_info
08:56:35.833180 tds_get_string: reading 20 from wire to give 10 to client.
08:56:35.833205 tds7_get_data_info:1558:
    colname = HEATSchema (10 bytes)
    type = 38 (integer-null)
    server's type = 38 (integer-null)
    column_varint_size = 1
    column_size = 4 (4 on server)
08:56:35.833231 processing result tokens.  marker is  d1(ROW)
08:56:36.998665 SQLFreeHandle(3, 0x0x7c142488)
08:56:36.998719 Sending packet
0000 06 01 00 08 00 00 01 00-                        |........|

08:56:36.998786 tds_process_default_tokens() marker is d1(ROW)
08:56:36.998810 processing row.  column is 0 varint size = 1
08:56:36.998829 processing row.  column size is 4
08:56:36.998846 clearing column 0 NULL bit
08:56:36.998865 tds_process_end: more_results = 0
        was_cancelled = 0
        error = 0
        done_count_valid = 1
08:56:36.998885 tds_process_end() state set to TDS_IDLE
08:56:36.998902                 rows_affected = 1
08:56:36.999642 Received header
0000 04 01 00 11 00 42 01 00-                        |.....B..|

08:56:36.999681 Received packet
0000 fd 20 00 fd 00 00 00 00-00                      |. ...... .|

08:56:36.999703 tds_process_end: more_results = 0
        was_cancelled = 1
        error = 0
        done_count_valid = 0
08:56:36.999725 tds_process_end() state set to TDS_IDLE
08:56:39.437423 tds_free_all_results()
08:56:39.437574 tds_free_all_results()
--------

Sorry for the long log post, I'm not sure what is relevant/important to the
issue.

Does anyone have any ideas/hints as to what may be causing this error when
launching the application? I have tried using TDS version 4.2 and 7.0 with
the same results as version 8.0.

Thanks,

-- 
Chad Sikorra



More information about the FreeTDS mailing list