realbasic-nug
[Top] [All Lists]

Re: Rs.field() vs rs.idxfield()

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Rs.field() vs rs.idxfield()
From: Dr Gerard Hammond <g dot hammond at garvan dot org dot au>
Date: Thu, 2 Dec 2004 08:55:45 +1100
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <200412012002 dot iB1K2ESS027788 at mac dot com> <a0620070abdd3d7671819 at [10 dot 10 dot 13 dot 6]>
Steve, Joe,

There used to be a bug in the ODBC plugin (on OS 9 with DataDirect drivers) that caused .Field to fail when you had previously retrieved the text info from the databasefield via the .binaryvalue call, before re-accessing the text info via the databasefield.stringvalue (or the .GetString)

In this case, .field().GetString returned a blank string.

I don't know if this is still the case with the latest version of the ODBC plugin.


At 2:33 PM -0600 1/12/04, Joseph J. Strout wrote:
At 2:03 PM -0600 12/1/04, Steve Smith wrote:

In my app, the use of rs.field("Name") appears to be failing at times. I'm
looking at a debugging session now where using the Field() method returns
nothing and the idxfield() method on the same recordset returns the correct
data.

I've never known Field to fail when you give it a name that actually exists -- my guess is that the column names aren't what you think they are, and you're asking for a field that doesn't exist in the output. (Remember, an output table (aka RecordSet) is not generally the same as a table actually in the database.)

Can you reproduce this in a simple case where you know the column name is right but Field still fails?

- Joe



--

Cheers,

Dr Gerard Hammond
Bioinformatic Analyst
Garvan Institute of Medical Research, Sydney, Australia.

 When discovered by his wife, kissing the maid, Groucho said
 "I was just whispering in her mouth."
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>