Unclosed quotation mark after the character string

  • It sounds like a simple error with an obvious fix but its not.

    The sql that caused the error 'Unclosed quotation mark after the character string' in one of my applications does not cause the same error when executed in the management studio.

    I am passing in XML as a parameter in the SQL. I've limited the number of XML records I'm passing in to 5 records which amounts to about 2K of data. I still receive the error.

    I'm using an older version of ADO which hasn't caused this problem in similiar situations on other machines. I'm using SQL2005.

    Any help or suggestions are much appreciated.

    Thank you

  • i'm guessing it's a truncation issue with a field cast to varchar.

    if your driver is older, it might not support xml or varchar(max), and is casting the string you said is 2K in length to varchar(8000)

    since half the string, and it's ending single quite might be missing, you get the error.

    that's my best guess without more details, but it makes some sense.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply