You must Sign In to post a response.
  • Category: XML

    How to fetch single quoted(') value from db file using XML

    Hi all
    I have a database file(.db) which contains 10 records and in that one record's column(account) is PF'LE*. I want to fetch this record using the condition account == PF'LE*.

    I am doing this through xml
    <Condition operator="EQUAL" version="6.2">
    <Field name="account" visibility="Local" version="6.2" /><Value>PF'LE*</Value>
    </Condition>

    But i am not able to fetch the record, even tried ' and "''" .. Kindly help to fix this.

    Regards
    Jhanani
  • #732929

    Try it with double quotes instead of single quotes. This is yet so simple and easy to implement rather than thinking for a complex solution set


    SET QUOTED_IDENTIFIER OFF
    WHERE condition account == "PF'LE*"
    SET QUOTED_IDENTIFIER ON


    This way you can directly pass the xml value to the query


    Please mark this as Answer, if this helps

    Regards,
    Alwyn Duraisingh.M 
    << Database Administrator >>
    Jesus saves! The rest of us better make backups...

  • #734735
    Hi Thanks for your reply.How to Set quoted identifier value in c#.
    I tried the below
    traceFilterQuery.SearchValue = traceFilterQuery.SearchValue.Replace("'", "\'");


    traceFilterQuery.SearchValue contains the single quoted value. i want a code line which can do quoted identifier on.

    Pls help.
    Regards
    Jhanani


  • Sign In to post your comments