ADO connection - Use of single-quotes

Hi There :slight_smile:

From AX2009 we are using ADO to write a XML-string to an external database. Everything is working fine … BUT

If the XML-string contains a single-quote we get an error-message. Until now we have replaced ’ by ", but our customers do not like their names being changed eg. Peter’s Bikeshop ==> Peter"s Bikeshop.

Can anyone help me to solve this problem, then I would be very happy :slight_smile:

Best Regards

Fensmark, Denmark

You didn’t tell us where and what error you get.

Assuming that the problem is in SQL, you can escape the apostrophe with an additional apostrophe (Peter’'s Bikeshop). That will insert a single apostrophe to database.

Thanks a lot - just what I was looking for :slight_smile:

Have an excellent day

FYI: The errormessage was:

‘ADODB.Command’ har returneret fejlkode 0x80040E14 (), dvs.: Incorrect syntax near ‘Shott’.

In English: Unknown error :slight_smile: