• geniot
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hello,
I've done some search in the forum and managed to run queries without 'malformed' exceptions.
Although I cannot get the account's name in salesforce right:
Pdq \'&"\\he Rockies
For test's sake my primary string was:
Pdq '&"\he Rockies
I'm escaping it with:
               elementValue = elementValue.replaceAll("\\\\","\\\\\\\\");
               elementValue = elementValue.replaceAll("\\'","\\\\'");
Note: backslash should be escaped before apostraphe =), otherwise it won't work.
After escaping the java string in the debugger looks like:
Pdq \\'&"\\\\he Rockies
and that's what is sent in the query.
Hopefully you'll see that post like I wrote it. Otherwise  check out the screenshot:

Regards,
Vitaly

 


Hello,
I've done some search in the forum and managed to run queries without 'malformed' exceptions.
Although I cannot get the account's name in salesforce right:
Pdq \'&"\\he Rockies
For test's sake my primary string was:
Pdq '&"\he Rockies
I'm escaping it with:
               elementValue = elementValue.replaceAll("\\\\","\\\\\\\\");
               elementValue = elementValue.replaceAll("\\'","\\\\'");
Note: backslash should be escaped before apostraphe =), otherwise it won't work.
After escaping the java string in the debugger looks like:
Pdq \\'&"\\\\he Rockies
and that's what is sent in the query.
Hopefully you'll see that post like I wrote it. Otherwise  check out the screenshot:

Regards,
Vitaly