|
FW: Cannot insert/update columns with data that contains both single and do: msg#00177db.mysql.windows
put double quotes around the value being submitted and then \ in front of any ' or " within the value. So in the code, your sql string should look like this: "Update table set column="<>href=\"javascript:launchwindow14(\'http://www.domainname.com/d cconnecters.ht m\')\">See Connectors"" From: "Keith Roberts" To: Subject: Cannot insert/update columns with data that contains both single and double quotes from Windows via ADO Date: Fri, 28 Feb 2003 07:42:54 -0800 I have a MySQL database. I am reading in a value from a database on the server that contains html code. I am trying to insert/update the values into a MySQL database on the internet. For example, I need to import a hyperlink that references a JavaScript window. The html looks like: UPDATE table SET column='value' <>href="javascript:launchwindow14('http://www.domainname.com/dcconnecter s.htm' )">See Connectors As you can see, there is are two double quotes and two single quotes. If I construct the value to be bracketed with single quotes and change the all the quotes to doubles ('',""), then the query will work. However, it will not write one of the doubles quotes to the database. If I bracket the value with single quotes, then the doubled double quotes will not pass into the database, i.e.: '<>href=""javascript:launchwindow14(''http://www.domainname.com/dcconnec ters.ht m'')"">See Connectors' will result in a database value of: <>href=""javascript:launchwindow14('http://www.domainname.com/dcconnecte rs.htm ')"">See Connectors If I change it and construct is as: "<>href=""javascript:launchwindow14(''http://www.domainname.com/dcconnec ters.ht m'')"">See Connectors", it results in: <>href="javascript:launchwindow14(''http://www.domainname.com/dcconnecte rs.htm '')">See Connectors If I use phpMyAdmin or MySQL CC on Windows 2000, the following value will work properly: '<>href=\"javascript:launchwindow14(\'http://www.domainname.com/dcconnec ters.ht m\')\">See Connectors' |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Cannot insert/update columns with data that contains both single and double quotes from Windows via ADO: 00177, Keith Roberts |
|---|---|
| Next by Date: | System Specs: 00177, Jason Manly |
| Previous by Thread: | Cannot insert/update columns with data that contains both single and double quotes from Windows via ADOi: 00177, Keith Roberts |
| Next by Thread: | System Specs: 00177, Jason Manly |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |