LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Program type out of range erro when trying to connect QT with MSSQL (https://www.linuxquestions.org/questions/linux-software-2/program-type-out-of-range-erro-when-trying-to-connect-qt-with-mssql-785585/)

urup 01-29-2010 07:19 AM

Program type out of range erro when trying to connect QT with MSSQL
 
I get this error when running my program under linux; under windows it works as expected:


Code:

$ ./mssql_test
("QSQLITE", "QMYSQL3", "QMYSQL", "QODBC3", "QODBC")
qGetStringData: Error while fetching data ( "[FreeTDS][SQL Server]Program type out of range" )
QVariant(int, 1) QVariant(QString, "")

I can retrive int's just fine, but not nvarchar's.

I'm using unixODBC 2.2.12 and FreeTDS 0.82.

The funny thing is, that I can use isql and tsql with no problem.

The mssql_test program:
Code:

#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QDateTime>
#include <QDebug>
#include <QVariant>
#include <QStringList>
#include <QSqlRecord>

//Create database object, set options,
QSqlDatabase createDatabase() {
    QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");

    //db.setHostName("10.2.0.13\VENNEDATABASE"); //When using ODBC, HostName is configured by ODBC driver.
    db.setDatabaseName("Kobborg"); //When using ODBC, enter the DSN name here (configured in your ODBC settings)
    db.setUserName("USER");
    db.setPassword("PASSWORD");

    return db;
}

int main() {

    QSqlDatabase db = createDatabase();
        qDebug() << db.drivers();

        qDebug() << db.connectOptions();

    bool ok = db.open();

    QSqlQuery query;
        query.prepare("select * from dbo.bruger");
    if (query.exec()) { //OK
        while (query.next()) {
                qDebug() << query.value(0) << query.value(6);
        }
    }
}

isql output of "select * from dbo.bruger":
Code:

SQL> select * from dbo.bruger
+----------+------------+----------------+---------+------------+------------+------------+-------------------+
| BrugerID | LognonNavn | Navn          | Intialer| Adgangskode| MenuSystem | Superbruger| (a lot more rows) |
+----------+------------+----------------+---------+------------+------------+------------+-------------------+
| 1        | Admin      | Administrator  | ADM    | 4370      | 1          | 1          |        ...        |
| 3        | Medarbejder| Medarbejder    | MA      | demo      | 1          | 0          |        ...        |
| 4        | General    | General        | GR      | demo      | 1          | 0          |        ...        |
| 14      | DEMO      | Test Testesen  | TT      | demo      | 1          | 1          |        ...        |
| 15      | Asterisk  | Asterisk pbx  | PHO    | demmmm    | 0          | 0          |        ...        |
+----------+------------+----------------+---------+------------+------------+------------+-------------------+
SQLRowCount returns 5
5 rows fetched
SQL>

freetds log of mssql_test (shortned to fit post):
Code:

log.c:190:Starting log file for FreeTDS 0.82
        on 2010-01-29 13:51:38 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 "LATIN1" 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:836:tds7_get_instance_port(10.2.0.13, VENNEDATABASE)
net.c:936:instance info
0000 05 8e 00 53 65 72 76 65-72 4e 61 6d 65 3b 54 45 |...Serve rName;TE|
0010 52 4d 49 4e 41 4c 30 32-3b 49 6e 73 74 61 6e 63 |RMINAL02 ;Instanc|
0020 65 4e 61 6d 65 3b 56 45-4e 4e 45 44 41 54 41 42 |eName;VE NNEDATAB|
0030 41 53 45 3b 49 73 43 6c-75 73 74 65 72 65 64 3b |ASE;IsCl ustered;|
0040 4e 6f 3b 56 65 72 73 69-6f 6e 3b 38 2e 30 30 2e |No;Versi on;8.00.|
0050 31 39 34 3b 74 63 70 3b-31 30 37 32 3b 6e 70 3b |194;tcp; 1072;np;|
0060 5c 5c 54 45 52 4d 49 4e-41 4c 30 32 5c 70 69 70 |\\TERMIN AL02\pip|
0070 65 5c 4d 53 53 51 4c 24-56 45 4e 4e 45 44 41 54 |e\MSSQL$ VENNEDAT|
0080 41 42 41 53 45 5c 73 71-6c 5c 71 75 65 72 79 3b |ABASE\sq l\query;|
0090 3b                    -                        |;|

...

net.c:779:Sending packet
0000 03 01 00 6e 00 00 01 00-ff ff 02 00 00 00 00 01 |...n.... ........|
0010 26 04 00 00 00 63 30 00-00 00 06 04 d0 00 00 30 |&....c0. .......0|
0020 00 00 00 53 00 45 00 54-00 20 00 51 00 55 00 4f |...S.E.T . .Q.U.O|
0030 00 54 00 45 00 44 00 5f-00 49 00 44 00 45 00 4e |.T.E.D._ .I.D.E.N|
0040 00 54 00 49 00 46 00 49-00 45 00 52 00 20 00 4f |.T.I.F.I .E.R. .O|
0050 00 4e 00 00 01 26 04 04-08 00 00 00 00 01 26 04 |.N...&.. ......&.|
0060 04 01 20 00 00 00 01 26-04 04 00 00 00 00      |.. ....& ......|

util.c:162:Changed query state from QUERYING to PENDING
token.c:495:tds_process_tokens(0x9dc2840, 0xbf8c6d28, 0xbf8c6d24, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 d9 00 38 01 00-                        |.....8..|

net.c:671:Received packet
0000 ab 80 00 3a 42 00 00 01-00 22 00 45 00 78 00 65 |...:B... .".E.x.e|
0010 00 63 00 75 00 74 00 69-00 6e 00 67 00 20 00 53 |.c.u.t.i .n.g. .S|
0020 00 51 00 4c 00 20 00 64-00 69 00 72 00 65 00 63 |.Q.L. .d .i.r.e.c|
0030 00 74 00 6c 00 79 00 3b-00 20 00 6e 00 6f 00 20 |.t.l.y.; . .n.o. |
0040 00 63 00 75 00 72 00 73-00 6f 00 72 00 2e 00 18 |.c.u.r.s .o.r....|
0050 54 00 45 00 52 00 4d 00-49 00 4e 00 41 00 4c 00 |T.E.R.M. I.N.A.L.|
0060 30 00 32 00 5c 00 56 00-45 00 4e 00 4e 00 45 00 |0.2.\.V. E.N.N.E.|
0070 44 00 41 00 54 00 41 00-42 00 41 00 53 00 45 00 |D.A.T.A. B.A.S.E.|
0080 00 01 00 79 00 00 00 00-ac 0d 00 00 01 38 00 00 |...y.... .....8..|
0090 00 26 04 04 00 00 00 00-ac 0d 00 00 01 38 00 00 |.&...... .....8..|
00a0 00 26 04 04 08 00 00 00-ac 0d 00 00 01 38 00 00 |.&...... .....8..|
00b0 00 26 04 04 01 20 00 00-ac 0d 00 00 01 38 00 00 |.&... .. .....8..|
00c0 00 26 04 04 00 00 00 00-fe 00 00 e0 00 00 00 00 |.&...... ........|
00d0 00                    -                        |.|

...

net.c:779:Sending packet
0000 03 01 00 6e 00 00 01 00-ff ff 02 00 00 00 00 01 |...n.... ........|
0010 26 04 00 00 00 63 30 00-00 00 06 04 d0 00 00 30 |&....c0. .......0|
0020 00 00 00 73 00 65 00 6c-00 65 00 63 00 74 00 20 |...s.e.l .e.c.t. |
0030 00 2a 00 20 00 66 00 72-00 6f 00 6d 00 20 00 64 |.*. .f.r .o.m. .d|
0040 00 62 00 6f 00 2e 00 62-00 72 00 75 00 67 00 65 |.b.o...b .r.u.g.e|
0050 00 72 00 00 01 26 04 04-08 00 00 00 00 01 26 04 |.r...&.. ......&.|
0060 04 01 20 00 00 00 01 26-04 04 00 00 00 00      |.. ....& ......|

util.c:162:Changed query state from QUERYING to PENDING
token.c:495:tds_process_tokens(0x9dc2840, 0xbf8c6f88, 0xbf8c6f84, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 04 69 00 38 01 00-                        |...i.8..|

net.c:671:Received packet
0000 81 22 00 00 00 10 00 38-08 42 00 72 00 75 00 67 |.".....8 .B.r.u.g|
0010 00 65 00 72 00 49 00 44-00 00 00 09 00 e7 64 00 |.e.r.I.D ......d.|
0020 06 04 c0 00 00 0a 4c 00-6f 00 67 00 6e 00 6f 00 |......L. o.g.n.o.|
0030 6e 00 4e 00 61 00 76 00-6e 00 00 00 09 00 e7 64 |n.N.a.v. n......d|
0040 00 06 04 c0 00 00 04 4e-00 61 00 76 00 6e 00 00 |.......N .a.v.n..|
0050 00 09 00 e7 06 00 06 04-c0 00 00 08 49 00 6e 00 |........ ....I.n.|
0060 74 00 69 00 61 00 6c 00-65 00 72 00 00 00 09 00 |t.i.a.l. e.r.....|
0070 e7 14 00 06 04 c0 00 00-0b 41 00 64 00 67 00 61 |........ .A.d.g.a|
0080 00 6e 00 67 00 73 00 6b-00 6f 00 64 00 65 00 00 |.n.g.s.k .o.d.e..|
0090 00 09 00 26 04 0a 4d 00-65 00 6e 00 75 00 53 00 |...&..M. e.n.u.S.|
00a0 79 00 73 00 74 00 65 00-6d 00 00 00 08 00 32 0b |y.s.t.e. m.....2.|
00b0 53 00 75 00 70 00 65 00-72 00 62 00 72 00 75 00 |S.u.p.e. r.b.r.u.|
00c0 67 00 65 00 72 00 00 00-09 00 26 04 0b 42 00 6f |g.e.r... ..&..B.o|
...
0450 00 26 04 04 05 00 00 00-fe 00 00 e0 00 00 00 00 |.&...... ........|
0460 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:1541:set current_results to cursor->res_info
token.c:1555:setting up column 0
token.c:1490:tds7_get_data_info:
        colname = BrugerID (8 bytes)
        type = 56 (int)
        server's type = 56 (int)
        column_varint_size = 0
        column_size = 4 (4 on server)
token.c:1555:setting up column 1
token.c:3294:adjust_character_column_size:
        Server charset: UCS-2LE
        Server column_size: 100
        Client charset: ISO-8859-1
        Client column_size: 50
token.c:1490:tds7_get_data_info:
        colname = LognonNavn (10 bytes)
        type = 39 (varchar)
        server's type = 231 (x UCS-2 varchar)
        column_varint_size = 2
        column_size = 50 (100 on server)
token.c:1555:setting up column 2
token.c:3294:adjust_character_column_size:
        Server charset: UCS-2LE
        Server column_size: 100
        Client charset: ISO-8859-1
        Client column_size: 50
token.c:1490:tds7_get_data_info:
        colname = Navn (4 bytes)
        type = 39 (varchar)
        server's type = 231 (x UCS-2 varchar)
        column_varint_size = 2
        column_size = 50 (100 on server)
token.c:1555:setting up column 3
token.c:3294:adjust_character_column_size:
        Server charset: UCS-2LE
        Server column_size: 6
        Client charset: ISO-8859-1
        Client column_size: 3
token.c:1490:tds7_get_data_info:
        colname = Intialer (8 bytes)
        type = 39 (varchar)
        server's type = 231 (x UCS-2 varchar)
        column_varint_size = 2
        column_size = 3 (6 on server)
token.c:1555:setting up column 4
token.c:3294:adjust_character_column_size:
        Server charset: UCS-2LE
        Server column_size: 20
        Client charset: ISO-8859-1
        Client column_size: 10
token.c:1490:tds7_get_data_info:
        colname = Adgangskode (11 bytes)
        type = 39 (varchar)
        server's type = 231 (x UCS-2 varchar)
        column_varint_size = 2
        column_size = 10 (20 on server)
token.c:1555:setting up column 5
token.c:1490:tds7_get_data_info:
        colname = MenuSystem (10 bytes)
        type = 38 (integer-null)
        server's type = 38 (integer-null)
        column_varint_size = 1
        column_size = 4 (4 on server)
token.c:1555:setting up column 6
token.c:1490:tds7_get_data_info:
        colname = Superbruger (11 bytes)
        type = 50 (bit)
        server's type = 50 (bit)
        column_varint_size = 0
        column_size = 1 (1 on server)
token.c:1555:setting up column 7

...

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 = 0
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 2
token.c:569:calling tds_process_param_result
token.c:1198:tds_process_param_result(0x9dc2840, 0xbf8c6f48)
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:569:calling tds_process_param_result
token.c:1198:tds_process_param_result(0x9dc2840, 0xbf8c6f48)
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:569:calling tds_process_param_result
token.c:1198:tds_process_param_result(0x9dc2840, 0xbf8c6f48)
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:569:calling tds_process_param_result
token.c:1198:tds_process_param_result(0x9dc2840, 0xbf8c6f48)
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:4 hidden return parameters
token.c:580:stored internal cursor id 180150000
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(0x9dc2840, 0xbf8c6f88, 0xbf8c6f84, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
query.c:2493:tds_cursor_setname() cursor id = 180150000
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 3a 00 00 01 00-ff ff 08 00 00 00 00 00 |...:.... ........|
0010 26 04 04 f0 de bc 0a 00-00 26 04 04 02 00 00 00 |&....... .&......|
0020 00 00 a7 0e 00 06 04 d0-00 00 0e 00 53 51 4c 5f |........ ....SQL_|
0030 43 55 52 39 64 66 35 64-36 30                  |CUR9df5d 60|

token.c:495:tds_process_tokens(0x9dc2840, 0xbf8c6f84, 0xbf8c6f80, 0x6914)
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
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 2
odbc.c:3270:    result_type=2, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4046
odbc.c:4079:SQLGetStmtAttr(0x9df5d60, -1, 0xbf8c740c, -6, 0xbf8c7408)
odbc.c:3917:_SQLGetStmtAttr(0x9df5d60, -1, 0xbf8c740c, -6, 0xbf8c7408)
odbc.c:4100:SQLNumResultCols(0x9df5d60, 0xbf8c74ae)
odbc.c:1702:SQLDescribeCol(0x9df5d60, 1, 0xbf8c6fe0, 256, 0xbf8c711a, 0xbf8c7118, 0xbf8c710c, 0xbf8c7116, 0xbf8c7114)
odbc.c:1991:SQLColAttribute(0x9df5d60, 1, 8, (nil), 0, (nil), 0xbf8c70fc)
odbc.c:1766:_SQLColAttribute(0x9df5d60, 1, 8, (nil), 0, (nil), 0xbf8c70fc)
odbc.c:1807:odbc:SQLColAttribute: fDescType is 8
odbc.c:1702:SQLDescribeCol(0x9df5d60, 2, 0xbf8c6fe0, 256, 0xbf8c711a, 0xbf8c7118, 0xbf8c710c, 0xbf8c7116, 0xbf8c7114)
odbc.c:1991:SQLColAttribute(0x9df5d60, 2, 8, (nil), 0, (nil), 0xbf8c70fc)
odbc.c:1766:_SQLColAttribute(0x9df5d60, 2, 8, (nil), 0, (nil), 0xbf8c70fc)
odbc.c:1807:odbc:SQLColAttribute: fDescType is 8
odbc.c:1702:SQLDescribeCol(0x9df5d60, 3, 0xbf8c6fe0, 256, 0xbf8c711a, 0xbf8c7118, 0xbf8c710c, 0xbf8c7116, 0xbf8c7114)
odbc.c:1991:SQLColAttribute(0x9df5d60, 3, 8, (nil), 0, (nil), 0xbf8c70fc)
odbc.c:1766:_SQLColAttribute(0x9df5d60, 3, 8, (nil), 0, (nil), 0xbf8c70fc)
odbc.c:1807:odbc:SQLColAttribute: fDescType is 8
odbc.c:1702:SQLDescribeCol(0x9df5d60, 4, 0xbf8c6fe0, 256, 0xbf8c711a, 0xbf8c7118, 0xbf8c710c, 0xbf8c7116, 0xbf8c7114)
odbc.c:1991:SQLColAttribute(0x9df5d60, 4, 8, (nil), 0, (nil), 0xbf8c70fc)
odbc.c:1766:_SQLColAttribute(0x9df5d60, 4, 8, (nil), 0, (nil), 0xbf8c70fc)
odbc.c:1807:odbc:SQLColAttribute: fDescType is 8
odbc.c:1702:SQLDescribeCol(0x9df5d60, 5, 0xbf8c6fe0, 256, 0xbf8c711a, 0xbf8c7118, 0xbf8c710c, 0xbf8c7116, 0xbf8c7114)
odbc.c:1991:SQLColAttribute(0x9df5d60, 5, 8, (nil), 0, (nil), 0xbf8c70fc)

...

query.c:2247:tds_cursor_setrows() cursor id = 180150000
query.c:2349:tds_cursor_fetch() cursor id = 180150000
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 2e 00 00 01 00-ff ff 07 00 02 00 00 00 |........ ........|
0010 26 04 04 f0 de bc 0a 00-00 26 04 04 01 00 00 00 |&....... .&......|
0020 00 00 26 04 00 00 00 26-04 04 01 00 00 00      |..&....& ......|

token.c:495:tds_process_tokens(0x9dc2840, 0xbf8c7294, 0xbf8c7290, 0x6d00)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 e5 00 38 01 00-                        |.....8..|

net.c:671:Received packet
0000 81 ff ff d1 01 00 00 00-0a 00 41 00 64 00 6d 00 |........ ..A.d.m.|
0010 69 00 6e 00 1a 00 41 00-64 00 6d 00 69 00 6e 00 |i.n...A. d.m.i.n.|
0020 69 00 73 00 74 00 72 00-61 00 74 00 6f 00 72 00 |i.s.t.r. a.t.o.r.|
0030 06 00 41 00 44 00 4d 00-08 00 34 00 33 00 37 00 |..A.D.M. ..4.3.7.|
0040 30 00 04 01 00 00 00 01-04 04 00 00 00 04 05 00 |0....... ........|
0050 00 00 04 05 00 00 00 04-05 00 00 00 04 05 00 00 |........ ........|
0060 00 04 05 00 00 00 04 05-00 00 00 04 05 00 00 00 |........ ........|
0070 04 05 00 00 00 04 05 00-00 00 04 05 00 00 00 04 |........ ........|
0080 05 00 00 00 04 05 00 00-00 04 05 00 00 00 04 05 |........ ........|
0090 00 00 00 04 05 00 00 00-04 05 00 00 00 04 05 00 |........ ........|
00a0 00 00 04 05 00 00 00 04-05 00 00 00 04 05 00 00 |........ ........|
00b0 00 04 01 00 00 00 04 05-00 00 00 00 04 00 00 00 |........ ........|
00c0 00 00 01 00 00 00 ff 11-00 e0 00 01 00 00 00 79 |........ .......y|
00d0 00 00 00 00 fe 00 00 e0-00 01 00 00 00          |........ .....|

token.c:510:processing result tokens.  marker is  81(TDS7_RESULT)
token.c:1520:processing TDS7 result metadata.
token.c:1529:no meta data
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:612:tds_process_tokens(). set current_results to cursor->res_info
token.c:621:tds_process_tokens::SET_RETURN stopping on current token
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=4040, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3340:odbc_process_tokens: returning result_type 4040
token.c:495:tds_process_tokens(0x9dc2840, 0xbf8c7294, 0xbf8c7290, 0x6508)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:612:tds_process_tokens(). set current_results to cursor->res_info
token.c:2166:tds_process_row(): reading column 0
token.c:1915:tds_get_data: type 56, varint size 0
token.c:1975:tds_get_data(): wire column size is 4
token.c:2166:tds_process_row(): reading column 1
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 22
token.c:2166:tds_process_row(): reading column 2
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 22
token.c:2166:tds_process_row(): reading column 3
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 4
token.c:2166:tds_process_row(): reading column 4
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 8
token.c:2166:tds_process_row(): reading column 5
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 4
token.c:2166:tds_process_row(): reading column 6

...

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=4040, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3340:odbc_process_tokens: returning result_type 4040
token.c:495:tds_process_tokens(0x9dc2840, 0xbf8c7334, (nil), 0x2282a)
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 = 1
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 = 1
odbc.c:4569:SQLGetData(0x9df5d60, 1, -16, 0xbf8c71dc, 4, 0xbf8c71d8)
convert_tds2sql.c:62:convert_tds2sql: src is 56 dest = -16
odbc.c:4569:SQLGetData(0x9df5d60, 2, -8, 0xbf8c70bc, 102, 0xbf8c71d8)
convert_tds2sql.c:62:convert_tds2sql: src is 39 dest = -8
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
odbc.c:4569:SQLGetData(0x9df5d60, 3, -8, 0xbf8c70bc, 102, 0xbf8c71d8)
convert_tds2sql.c:62:convert_tds2sql: src is 39 dest = -8
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
odbc.c:4569:SQLGetData(0x9df5d60, 4, -8, 0xbf8c70bc, 8, 0xbf8c71d8)
convert_tds2sql.c:62:convert_tds2sql: src is 39 dest = -8
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
odbc.c:4569:SQLGetData(0x9df5d60, 5, -8, 0xbf8c70bc, 22, 0xbf8c71d8)
convert_tds2sql.c:62:convert_tds2sql: src is 39 dest = -8
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c6d1a, 0xbf8c6d28, 0xbf8c6b1a, 512, 0xbf8c6d24)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 1, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:609:SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
error.c:510:_SQLGetDiagRec(3, 0x9df5d60, 2, 0xbf8c7046, 0xbf8c7054, 0xbf8c6e46, 512, 0xbf8c705a)
odbc.c:4569:SQLGetData(0x9df5d60, 6, -16, 0xbf8c71dc, 4, 0xbf8c71d8)
convert_tds2sql.c:62:convert_tds2sql: src is 56 dest = -16
odbc.c:4569:SQLGetData(0x9df5d60, 7, -16, 0xbf8c71dc, 4, 0xbf8c71d8)
convert_tds2sql.c:62:convert_tds2sql: src is 50 dest = -16
odbc.c:3664:SQLFetchScroll(0x9df5d60, 1, 0)
odbc.c:3396:_SQLFetch(0x9df5d60, 1, 0)
query.c:2349:tds_cursor_fetch() cursor id = 180150000
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 2e 00 00 01 00-ff ff 07 00 02 00 00 00 |........ ........|
0010 26 04 04 f0 de bc 0a 00-00 26 04 04 02 00 00 00 |&....... .&......|
0020 00 00 26 04 00 00 00 26-04 04 01 00 00 00      |..&....& ......|

token.c:495:tds_process_tokens(0x9dc2840, 0xbf8c7294, 0xbf8c7290, 0x6d00)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 db 00 38 01 00-                        |.....8..|

net.c:671:Received packet
0000 81 ff ff d1 04 00 00 00-0e 00 47 00 65 00 6e 00 |........ ..G.e.n.|
0010 65 00 72 00 61 00 6c 00-0e 00 47 00 65 00 6e 00 |e.r.a.l. ..G.e.n.|
0020 65 00 72 00 61 00 6c 00-04 00 47 00 52 00 08 00 |e.r.a.l. ..G.R...|
0030 64 00 65 00 6d 00 6f 00-04 01 00 00 00 00 04 04 |d.e.m.o. ........|
0040 00 00 00 04 01 00 00 00-04 05 00 00 00 04 05 00 |........ ........|
0050 00 00 04 00 00 00 00 04-05 00 00 00 04 00 00 00 |........ ........|
0060 00 04 00 00 00 00 04 00-00 00 00 04 00 00 00 00 |........ ........|
0070 04 05 00 00 00 04 05 00-00 00 04 05 00 00 00 04 |........ ........|
0080 05 00 00 00 04 05 00 00-00 04 05 00 00 00 04 05 |........ ........|
0090 00 00 00 04 05 00 00 00-04 05 00 00 00 04 05 00 |........ ........|
00a0 00 00 04 05 00 00 00 04-01 00 00 00 04 05 00 00 |........ ........|
00b0 00 01 04 00 00 00 00 00-01 00 00 00 ff 11 00 e0 |........ ........|
00c0 00 01 00 00 00 79 00 00-00 00 fe 00 00 e0 00 01 |.....y.. ........|
00d0 00 00 00              -                        |...|

...
The same error and output continue for the next records.
These have cut out.

I've been looking for a solution of a couple of days now, with no luck... :-(

Any help is appriciated.

Regards
Mark

Elv13 01-30-2010 01:31 PM

Those functions return something, please add some qDebug() statment and read all sql errors.


All times are GMT -5. The time now is 11:41 AM.