#1 Using moveNext fails with MySQL Connector data sources

closed
nobody
5
2008-09-10
2007-03-14
No

The following code:

ODBCConnection *conn = [[ODBCConnection alloc] init];
[conn initSQLEnvironment];
[conn setDsn:@"www"];
[conn setUserName:@"aname"];
[conn setPassword:@"apassword"];
[conn connect];
ODBCRecordset *rs = [conn open:@"select * from users;"];
NSLog([[rs dictionaryFromRecord] description]);
[rs moveNext];
NSLog([[rs dictionaryFromRecord] description]);
[conn close];

Produces this output:
2007-03-14 15:12:56.093 ODBCTest[2580] {id = 0; security1 = 0; uid = 21673; }
2007-03-14 15:12:56.096 ODBCTest[2580] SQL Error State:24000, Native Error Code: 0, ODBC Error: [MySQL][ODBC 3.51 Driver][mysqld-4.1.13a-log]SQLGetData without a preceding SELECT
2007-03-14 15:12:56.096 ODBCTest[2580] SQL Error State:24000, Native Error Code: 0, ODBC Error: [MySQL][ODBC 3.51 Driver][mysqld-4.1.13a-log]SQLGetData without a preceding SELECT
2007-03-14 15:12:56.097 ODBCTest[2580] SQL Error State:24000, Native Error Code: 0, ODBC Error: [MySQL][ODBC 3.51 Driver][mysqld-4.1.13a-log]SQLGetData without a preceding SELECT
2007-03-14 15:12:56.097 ODBCTest[2580] {}

As you can see, the log shows that the first row is successfully fetched, but after calling moveNext I can no longer retrieve data.

This can be recreated also by doing select * in ODBCQueryTool on a MySQL ODBC source with the MySQL connector. The query tool will go into an infinite loop because it cannot get to the end of the results.

Discussion

  • Andy Satori

    Andy Satori - 2007-03-23

    Logged In: YES
    user_id=14839
    Originator: NO

    Which ODBC Driver ? The Actual Tech drivers seem to work. We have not tested others

     
  • Andy Satori

    Andy Satori - 2007-03-26

    Logged In: YES
    user_id=14839
    Originator: NO

    I'll get this driver installed on the iMac for testing and see what I can. Should have an answer Friday

     
  • Andy Satori

    Andy Satori - 2008-09-10
    • status: open --> closed
     
  • Andy Satori

    Andy Satori - 2008-09-10

    Apparently the issue has been resolved in either newer builds of the MySQL driver or ODBCKit as it is no longer reproducable.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks