Storing & in MySQL
From: Jonck (jonck_at_vanderkogel.net)
Date: 10/25/04
- Next message: amurchis: "Re: Tomcat DB2 connection - No suitable driver"
- Previous message: amurchis: "Re: Tomcat DB2 connection - No suitable driver"
- Next in thread: Gregory Toomey: "Re: Storing & in MySQL"
- Reply: Gregory Toomey: "Re: Storing & in MySQL"
- Reply: _Mario_: "Re: Storing & in MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 25 Oct 2004 15:20:47 GMT
Hi everybody,
I'm having a problem where the JDBC driver probably means well but is
not doing what I want.
I need to store data in a database which will at a later time be sent on
to a servlet in XML format. Some characters need to be given their
special XML format, for example if I want to transmit the ampersand (&)
sign, I need to pass along the code & instead of just &.
So what happens is my app parses user input, replaces all special signs
like & with their XML counterparts and then I try to store these in
MySQL. However, when I do the INSERT into MySQL, the & sign is
stored in MySQL as & which then causes me problems when I want to send
this data on to the servlet.
Therefore my question is, how do I get MySQL to store the &
character sequence without it being "intelligent" and changing it to the &
sign?
Thanks very much for your help,
Jonck
P.S. using MySQL 4.0.20-standard and the mysql-connector-java-3.0.14-
production
- Next message: amurchis: "Re: Tomcat DB2 connection - No suitable driver"
- Previous message: amurchis: "Re: Tomcat DB2 connection - No suitable driver"
- Next in thread: Gregory Toomey: "Re: Storing & in MySQL"
- Reply: Gregory Toomey: "Re: Storing & in MySQL"
- Reply: _Mario_: "Re: Storing & in MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|