Matt,
I have run across this with the JDBC plugin talking to an Oracle DB. I found that if only one record was returned, this logic bombed in the exact same manner, the workaround was to set the curRecord pointer to the last and read backwards if the record count ==1. Otherwise you just read records as you have coded. You should verify that the rs begins at the "0" record. Your while condition should be the return value of [rs moveNext].


matt 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.

Has anyone got past this, and how did you do it?  I would like to use the 
ODBCKit, however because of deadlines, may be forced to abandon completely.  
Are there any other Cocoa ODBC alternatives?

Thanks in advance for any and all help.
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/mcstoufer%40lbl.gov

This email sent to [EMAIL PROTECTED]

--
* Martin C. Stoufer              *
* ISS/IT                         *
* Lawrence Berkeley National Lab *
* 510-486-5306                   *
* MS 937-700                     *

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________

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