I need help saving strings which have embedded quote characters.
I capture data from a webpage. When the description field contains a double quote, my code fails. I have no control over whether the code contains these quotes.
Is there any way to save the characters in my Access and SQL databases?
Currently I remove the character with the replace command, but it seems there must be a better way.
Example of code in strdescription that fails when I use strDescription in an SQL statement that inserts data into the database.
In this case the 7" portion of the code fails:
<span title="" data-hasqtip="3699" oldtitle='RES SMD; 0603 0R00 5% 0.1W 200PPM 7" T&R 12 NC; 232270296001L'>RES SMD; 0603 0…</span>
Here is the actual code that fails. A syntax error is produced when a double quote is embeded in strDescription
strSQLtext = "Insert Into NameConversionAppend (IndicatedManufacturer,PartNumber,SuspectedLineID, description, supplier, DistiType, Source) Values ('" & strManufacturerAsUploaded & "','" & strOrderNumber & "'," & intLineIDold & ",'" & strDescription & "','" & strSupplier & "','" & strDistType & "','mywebsite');"