[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql-odbc
Subject: Re: Need to be able to import both single and double quotes in the same field via ADODB
From: "PeterWR" <pwr () post4 ! tele ! dk>
Date: 2003-02-28 3:54:42
[Download RAW message or body]
Hi,
I think this is a problem related to Windows and ADO - I normally have the
same problem when having ' in a text, like PC's - if You try to send a
text/field from one ASP-page to another, You never get the text to
Request.Form() - it dies in between.
On the other hand, You can paste the same text using a GUI direct into MySQL
on Windows.
My conclusion is, this is related to Windows. Probably the only solution is
using a substituion-character when writing to database, and replace-back
when displaying.
Best regards
Peter
----- Original Message -----
From: "Keith Roberts" <keith@getadeal.com>
To: <myodbc@lists.mysql.com>
Sent: Friday, February 28, 2003 4:21 AM
Subject: Need to be able to import both single and double quotes in the same
field via ADODB
> I have a MySQL database. In the database, I need to import a column that
> contains a hyperlink. To do this, I need the ability to insert/update a
> value that will contain both single and double quotes. For example, I
need
> to import a hyperlink that references a JavaScript window. The html looks
> like:
>
> <a
>
href="javascript:launchwindow14('http://www.laptopsforless.com/dcconnecters.
> htm')">See Connectors</a>
>
> 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.:
>
> '<a
>
href=""javascript:launchwindow14(''http://www.domain.com/dcconnecters.htm'')
> "">See Connectors</a>' will result in a database value of:
> >a
>
href=""javascript:launchwindow14('http://www.domain.com/dcconnecters.htm')""
> >See Connectors</a>
>
> If I change it and construct is as:
> "<a
>
href=""javascript:launchwindow14(''http://www.domain.com/dcconnecters.htm'')
> "">See Connectors</a>", it results in:
> <a
>
href="javascript:launchwindow14(''http://www.domain.com/dcconnecters.htm'')"
> >See Connectors</a>
>
> I really think that this can be accomplished. The question is, how?
>
> I have used this in MySQL CC and phpMyAdmin and it works, but the same
> command fails in ADO:
> UPDATE table SET column='<a
>
href=\"javascript:launchwindow14(\'http://www.domain.com/dcconnecters.htm\')
> \">See Connectors</a>'
>
> Under ADO I get the following error:
> ADODB.Parameters:Parameter object is improperly defined. Inconsistent or
> incomplete information was provided.
>
> Connection String looks like:
>
> Provider=MSDASQL.1;Persist Security Info=False;Data Source=DSNAME
>
> What can I do to get this working from Windows 2000, MySQL ODBC, and ADO?
>
>
> --
> Keith Roberts
> IT Manager - Laptops For Less
> 2995 White Star
> Anaheim, CA 92806
> http://www.laptopsforless.com
> 714.224.3980
>
>
> --
> Keith Roberts
> IT Manager - Laptops For Less
> 2995 White Star
> Anaheim, CA 92806
> http://www.laptopsforless.com
> 714.224.3980
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/products/myodbc/manual_toc.html (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To unsubscribe, e-mail <myodbc-unsubscribe@lists.mysql.com>
> To unsubscribe from Yahoo! Groups version, e-mail
myodbc-unsubscribe@yahoogroups.com
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/products/myodbc/manual_toc.html (the manual)
http://lists.mysql.com/ (the list archive)
To unsubscribe, e-mail <myodbc-unsubscribe@lists.mysql.com>
To unsubscribe from Yahoo! Groups version, e-mail myodbc-unsubscribe@yahoogroups.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic