• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ODBCKit problems with MySQL DB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ODBCKit problems with MySQL DB


  • Subject: Re: ODBCKit problems with MySQL DB
  • From: Martin Stoufer <email@hidden>
  • Date: Thu, 28 Aug 2008 10:03:51 -0700
  • Organization: LBNL

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 (email@hidden)

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:
This email sent to email@hidden

-- * 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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >ODBCKit problems with MySQL DB (From: "matt" <email@hidden>)

  • Prev by Date: Re: Core Animation : are text attributes animatable ?
  • Next by Date: Re: NSProgressIndicator not responding to calls outside of AppController class
  • Previous by thread: ODBCKit problems with MySQL DB
  • Next by thread: Re: ODBCKit problems with MySQL DB
  • Index(es):
    • Date
    • Thread