You need to sign in to do that
Don't have an account?
malformed query error
Hey Guys,
Im trying to determine whether or not a contact already exists with an existing account. here is the query that I'm using:
Dim qryc As sForceAPI.QueryResult = binding.query("select id from contact where (FirstName = '" & Me.txtAdminFirstName.Value.Trim & "' and LastName = '" & Me.txtAdminLastName.Value.Trim & "') and accountid = " & qryRecordsAccount(0).Id)
Dim qryRecordsC() As sForceAPI.sObject = qryc.records
Just so you know, qryRecordsAccount(0).id gets the account id and it works but just to be complete, here is the definition for qryRecordsAccount:
Dim qryAccount As sForceAPI.QueryResult = binding.query("select id, name from Account where name = '" & Me.txtAccountName.Value.Trim & "'")
Dim qryRecordsAccount() As sForceAPI.sObject = qryA.records
When I try to run this code I get the following error when it reaches the dim qryc as.... line above:
server error in'/' application
malformed_query: malformed query: expecting EOF, found 'sZZAAY'
The error references this line of code:
Line 265: Dim results() As Object = Me.Invoke("query", New Object() {queryString})
Source File: C:\LiveWebs\www.visualboardbook.com\Web References\sForceAPI\Reference.vb Line: 265
Please Help!
mdk
and accountid = '" & qryRecordsAccount(0).Id & "'"
SforceExplorer is great for trying out your SOQL queries. http://sforce.sf.net/
Message Edited by SimonF on 05-25-2005 10:47 AM