You need to sign in to do that
Don't have an account?
Keaton Klein
Soql query error
I have a C# program what was working great until i modified this query. The query currently reads...
qr1 = binding.queryAll("select id, external_id__c from contact where external_id__C in '" + naidno2 + "'");
This line of code produces this error message... "Binding variable only allowed in Apex code"
naidno2 is a string which contains unique IDs separated by commas, i.e. "A4568,R4568,D6548,A4568"
qr1 = binding.queryAll("select id, external_id__c from contact where external_id__C in '" + naidno2 + "'");
This line of code produces this error message... "Binding variable only allowed in Apex code"
naidno2 is a string which contains unique IDs separated by commas, i.e. "A4568,R4568,D6548,A4568"
Please try to send the data in following format;
string s1='Test';
string s2='Test 1';
string Querystring = 'select Id, Name from Account where name in (\''+s1+'\''+','+'\''+s2+'\')';
Input query string should be like this ==>select Id, Name from Account where name in ('Test','Test 1')
Thanks
Shaijan
All Answers
Please try to send the data in following format;
string s1='Test';
string s2='Test 1';
string Querystring = 'select Id, Name from Account where name in (\''+s1+'\''+','+'\''+s2+'\')';
Input query string should be like this ==>select Id, Name from Account where name in ('Test','Test 1')
Thanks
Shaijan