Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Probem with ListObject and an apostrophe
Joe_Ehrenfeld
I am using ListObject to find a folder. My QureryStr param is built like this:string queryStr = "name ='" + projectName + "'";My issue is when the projectName has an apostrophe in it I get the error get(name) not implemented for this datatype.How would I go about handling queried with an apostrophe in them?
Find more posts tagged with
Comments
Carsten_Kulms
Message from Carsten Kulms <
carsten.kulms@opentext.com
> via eLink
eLink
The apostrophe is the same as the single-quote used to enclosed the projectname value in the where clause ... try to double it.
Joe_Ehrenfeld
I was able to get it to work by using this:string queryStr = "name ='" + projectName.Replace("'", "'\'") + "' ";