A. Usually the single quote character is reserved for inserting information into a database, and so if a single quote is contained in the actual data to be inserted, the command often becomes corrupted. To solve the problem, simply replace any single quote with two quotes (not the double quote character but two single-quote characters). The following sample command performs this replacement automatically:

sContent = Replace(sContent,"'","''")

where sContent contains the data that needs single quotes replaced, so that the data can be inserted into a database.

End of Article




You must log on before posting a comment.

If you don't have a username & password, please register now.