+ Start a Discussion
victor92victor92 

Malformed query

There is an error when i try to sent this sql sentence:

cadena=@"SELECT Name,Description,ParentId FROM Attachment WHERE ParentId=:'%@'",parentId;

 

This is the error unexpected token: ':' (Bind variables only allowed in Apex code), errorCode=MALFORMED_QUERY}
2012-06-29 09:12:38.730 PruebaFinal[2782:fb03] request:didFailLoadWithError: Error Domain=com.salesforce.RestAPI.ErrorDomain Code=999 "The operation couldn’t be completed. (com.salesforce.RestAPI.ErrorDomain error 999.)" UserInfo=0x6c79ff0 {message=
FROM Attachment WHERE ParentId=:'%@'

I expect that someone can help me.

Tom GersicTom Gersic

Remove the colon after "ParentId="