If they are pasting from Word, there is a lot of Word-proprietary XML and
formatting that is being pasted as well.

Your insert statement may be failing because:
        1) Because of the XML and formatting, the statement is going beyond
the TEXT fields limit;
        2) There are ' (single quotes) in the formatting forcing an SQL /
JDBC error;
        3) The JDBC is reading and interpreting the XML and causing a
failure of some kind.

Your best bet is to either ask the people pasting to not use Word, have them
paste from Word into NOTEPAD, TextEdit or VI before pasting into your app,
OR try converting your TEXT field into a LONGTEXT field.

Just a few thoughts...

J.R.


-----Original Message-----
From: Vinny [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 29, 2006 3:53 PM
To: mysql@lists.mysql.com
Subject: Weird M$ Pasting issue

Hello All,
I am running across a very weird problem.
Sometimes when a person paste text from a Worddoc into the text field of our
webapp, the insert fails. Unfortunately I am not seeing the failure in the
logs. There are a lot of factors to consider. The path to mysql looks like
this.

Firefox (OSX)   ->  JDBC ->  Mysql (on linux)
the field we are pasting to is a TEXT field.

when I paste into an emacs editor. I see what looks like formatting code.
Not sure why that is getting pasted into the text field and also not sure
why the jdbc prepared statements are not making the text safe for insert.
Anyone have a clue as to what might be happening?

--
Ghetto Java: http://www.ghettojava.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to