[thelist] Transversing a RecordSet from Multiple Tables

lon.kraemer lwkraemer at directvinternet.com
Sat Jun 15 17:10:01 CDT 2002


> [ Picked text/plain from multipart/alternative ]

Please send plain text only to the list.

> Hi list,
>
> I've got a search across multiple tables for specific records and I'm
> getting an Object Required " response back from the browser. My guess is
> that the object I'm referencing wasn't returned in the RecordSet. For
> example:
>
> if NOT states.EOF then
>    states.movefirst
>    if SBU.SBUName <> NULL then   <------------------<<<
>      while (SBU.SBUName <> NULL OR NOT states.EOF)
>        response.write("<strong>" & SBU.SBUName & "</strong><br>" & vbCLRF)
> states.movenext
>      wend
>    end if
> end if
>
> The arrow points to the line where I'm getting the Object Required Error. Is
> there a way I can detect if the object, SBU.SBUName, even exists in the
> RecordSet? As you can see, I'm just try to see if there is anything in it,
> if so, then write something, if not skip it.

You didn't show us how you set up your connection/recordset, so assumption...
I assume SBU.SBUName is a field you queried for and 'states' is the recordset.
The object needed is the recordset object - 'states'.
To show the field you want states("SBU.SBUName") or better
states.fields.item("SBU.SBUName").value

--
Lon Kraemer
-----------------------------------------




More information about the thelist mailing list