---------- Original Message ----------------------------------
From: Jonathan Monroe <[EMAIL PROTECTED]>
Date:  Thu, 28 Aug 2008 12:59:44 -0500



On Aug 28, 2008, at 12:19 PM, [EMAIL PROTECTED] wrote:

> I am having a problem with the ODBCKit, and a MySQL database.
>
> I really like the design and usage of the ODBCKit, and it is quite  
> easy to use.
>
> There is however quite a serious problem that I cannot get around.   
> When a recordset is returned, I can only see one record.  Attempting  
> to move to another record (moveNext) sets the isEOF property, and  
> there is no data available.
>
> ODBCRecordset *rs = [odbcConnection open:@"select * from Stuff"];
> rs.moveFirst;
> while(!rs.isEOF)
>  {
>  [popup addItemWithTitle:[[rs fieldByName:@"Name"] asString]];
>  [rs moveNext];
>  }
>
> I ran across a bug report of the same issue from last year, and a  
> response that this has only been tested with the ActualTechnologies  
> ODBC driver.  I have used both the MySQL connect driver, as well as  
> the Actualtechnologies drivers with the same exact result.

Not all drivers support scrollable cursors, which means that  
rs.moveFirst (and moveLast and movePrevious) would not be supported.   
Your best best is to assume forward-only cursors, and only use  
rs.moveNext.

You do not need to call rs.moveFirst after executing a query - the  
cursor is placed at the first row by default.

Jonathan Monroe
Actual Technologies - ODBC for Mac OS X
http://www.actualtechnologies.com


Jonathan, Martin,
Thanks for the advice, however I still can only see the first record in the 
recordset.  I am very frustrated at this point.  I see that this support 
request for last year has not been resolve, and it appears to be the same 
problem:
http://sourceforge.net/tracker/index.php?func=detail&aid=1681056&group_id=177561&atid=881727

I was thinking that what I am trying to do was quite common (MySQL DB using 
ODBC), and hoping I could leverage what someone else has already learned.

I would really like to get this working using ODBC rather than being limited to 
a particular DB, even if ODBCKit doesn't work and/or is no longer supported.

Again, thanks,
Matt 




________________________________________________________________
Sent via the WebMail system at youney.com


 
                   
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to