<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to support-requests</title><link>https://sourceforge.net/p/odbckit/support-requests/</link><description>Recent changes to support-requests</description><atom:link href="https://sourceforge.net/p/odbckit/support-requests/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 14 Mar 2007 22:23:32 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/odbckit/support-requests/feed.rss" rel="self" type="application/rss+xml"/><item><title>Using moveNext fails with MySQL Connector data sources</title><link>https://sourceforge.net/p/odbckit/support-requests/1/</link><description>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.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Colin Cornaby</dc:creator><pubDate>Wed, 14 Mar 2007 22:23:32 -0000</pubDate><guid>https://sourceforge.nete47570c3192831a65ea6ec6987eb6d2792391b67</guid></item></channel></rss>