You need to sign in to do that
Don't have an account?
vino1.395228003587918E12
Bind variables only allowed in Apex code error in SOQL query from .Net
Hi,
I have fetched the AsyncApexJob from .Net.
In SOQL i got the "Bind variables only allowed in Apex code" Error.
My code is:
string res = "Failed";
QueryResult query = null;
string soql;
soql = "SELECT Status,JobType,NumberOfErrors,CompletedDate FROM AsyncApexJob WHERE Status="+res+"";
query = sfdcbind.query(soql);
Anyone help to solve this.
I have fetched the AsyncApexJob from .Net.
In SOQL i got the "Bind variables only allowed in Apex code" Error.
My code is:
string res = "Failed";
QueryResult query = null;
string soql;
soql = "SELECT Status,JobType,NumberOfErrors,CompletedDate FROM AsyncApexJob WHERE Status="+res+"";
query = sfdcbind.query(soql);
Anyone help to solve this.
soql = "SELECT Status,JobType,NumberOfErrors,CompletedDate FROM AsyncApexJob WHERE Status='"+res+"'";
"System.Web.Services.Protocols.SoapException: MALFORMED_QUERY:
CompletedDate FROM AsyncApexJob Status='Completed' "
where Build_To_Account__c != Ship_To_Account__c ^ ERROR at Row:1:Column:152 Bind variables only allowed in Apex code
when I ran a query from Developer console:query Editor:
select id , Build_To_Account__c,Build_To_Account__r.Id,Ship_To_Account__c, Ship_To_Account__r.Id from Sales_History__c where Build_To_Account__c != Ship_To_Account__c