You need to sign in to do that
Don't have an account?
Office Edition help
I keep getting hung up using the query result sets. I am just so steeped in ADO I need a new model for the sForce ResultSet.
e.g.
Set rs = sForceSession.Query("select name from account", False)
For each r in rs
for each f in flds
msgbox(f.name)
next
next
the msgbox will display every field name available to an account object even tho I only asked for the "name" field in the query. Whats up with that?
It appears as if the RS is a collection of "account" objects but I still have trouble extracting just the one field I am interested in.
I would expect to be able to do things like:
Set rs = sForceSession.Query("select name from account", False)
-- msgbox(rs(0).fields(0).value)
or
-- for each r in rs
set flds = r.fields
msgbox(flds(0).value)
or
-- for each r in rs
msgbox( r.fields("name") )
But everything I try comes up with a "does not support..."
Can anyone post a quick cheat sheet for working with these result sets?
Thanks
Dave
Well so far it appears I can only use "for each" or name the field specifically.
e.g.
for each r in rs
msgbox(r("fieldname"))
next