+ Start a Discussion

Help with VB 6 queries


I am trying to figure out how to query information properly in VB 6 via the sf API, but am having no luck.

Below is some sample code that I have written to count how many results there are in a queryresultset.  No matter what I do, I keep getting 0.

I don't have trouble logging in.

Public Function TestUpdateable(intCount As Integer)

Dim qrs As QueryResultSet
Dim soql As String
Dim sobj As SObject
Dim fld As Field
Dim blnUpdateable As Boolean
Dim strTest As String

soql = "select ETMemberID from Account"
Set qrs = sfdc.Query(soql, False)

strTest = qrs.EntityType

For Each sobj In qrs
intCount = intCount + 1
Next sobj

intCount = intCount

End Function



This doesn't look like a valid query to me:

select ETMemberID from Account

Isn't ETMember a custom field? (If it is, the syntax is ETMemberID__c)