Re: ODBCKit problems with MySQL DB
Re: ODBCKit problems with MySQL DB
- Subject: Re: ODBCKit problems with MySQL DB
- From: Martin Stoufer <email@hidden>
- Date: Thu, 28 Aug 2008 10:58:58 -0700
- Organization: LBNL
So we know there are multiple rows in the db that satisfy your query.
Can you verify that multiple rows do show up in the rs object? I find
that the call to rs.moveFirst is a bit redundant and the loop condition
being [rs moveNext]. This assumes that this call does return a BOOL if
successful.
I recall that in my old Python days working with MySQL, I had to
explicitly set a 'read all' bit on the record set so all records would
be read from the result stream before I iterated through them. I don't
know if this translates into this context.
matt wrote:
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].
Martin,
The problem is that many records should be returned by this query, however I can only read the first one. The column count is correct, as is the data, however only one row is returned. The data is in the Db, and queries using other s/w work fine, just not the ODBCKit.
Thanks,
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