CHAR, JDBC and MS Office
Posted in 2012
Topics: Connectivity: ODBC / JDBC / .NET, Triggers, Constraints & Referential Integrity, Java & JDBC Development
Hi! Im facing with an issue on a java JEE program: Programmers created CHAR(n) columns on a table, then they have a form with INPUT fields. This fields are INSERTed or UPDATEd with a JDBC connection and a prepared statement. When users cut text from MS Office Word and paste it in the fields, the transacction never ends. The INSERT execution stays waiting for something. It never reports an error or anything. We now know that is triggered for bytes in text which give format to it, on MS Office. When text is filtered to avoid that bytes the insertions ends normally. ¿could it be an IDS bug? ¿JDBC bug? ¿programmer bug? ¿should we filter all of the fields? ¿should we prohibit cut and paste from MS Office? I'd like to ear you thoughts about this case. Thanks in advance. Greetings. --Nestor
What does the User past out of Word? Pure ASCII Text, or some of that crazy formatted stuff Word usually stores while doing a cut&paste? Joerg Volz ----------------------------------------------------------------------------- -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of nestor gomez munoz Sent: Wednesday, March 07, 2012 4:46 PM To: ids@iiug.org Subject: CHAR, JDBC and MS Office [26471] Hi! Im facing with an issue on a java JEE program: Programmers created CHAR(n) columns on a table, then they have a form with INPUT fields. This fields are INSERTed or UPDATEd with a JDBC connection and a prepared statement. When users cut text from MS Office Word and paste it in the fields, the transacction never ends. The INSERT execution stays waiting for something. It never reports an error or anything. We now know that is triggered for bytes in text which give format to it, on MS Office. When text is filtered to avoid that bytes the insertions ends normally. ¿could it be an IDS bug? ¿JDBC bug? ¿programmer bug? ¿should we filter all of the fields? ¿should we prohibit cut and paste from MS Office? I'd like to ear you thoughts about this case. Thanks in advance. Greetings. --Nestor ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum. IT Handel und Beratung Jörg Volz Bernhard-Früh-Str. 7 77855 Achern GERMANY Tel: +49 (0)7841-681651 Fax: +49 (0)7841-681654 Mobil: +49 (0)170-2989757 VAT-ID: DE201383541 http://www.it-volz.de
It seems the cut includes all of that formater stuff besides the plain char text. El mié, 07-03-2012 a las 10:51 -0500, Joerg Volz escribió: > What does the User past out of Word? Pure ASCII Text, or some of that crazy > formatted stuff Word usually stores while doing a cut&paste? > > Joerg Volz > ----------------------------------------------------------------------------- > > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of nestor > gomez munoz > Sent: Wednesday, March 07, 2012 4:46 PM > To: ids@iiug.org > Subject: CHAR, JDBC and MS Office [26471] > > Hi! > > Im facing with an issue on a java JEE program: > Programmers created CHAR(n) columns on a table, then they have a form > with INPUT fields. This fields are INSERTed or UPDATEd with a JDBC > connection and a prepared statement. > > When users cut text from MS Office Word and paste it in the fields, the > transacction never ends. The INSERT execution stays waiting for > something. It never reports an error or anything. > > We now know that is triggered for bytes in text which give format to it, > on MS Office. When text is filtered to avoid that bytes the insertions > ends normally. > > ¿could it be an IDS bug? ¿JDBC bug? ¿programmer bug? ¿should we filter > all of the fields? ¿should we prohibit cut and paste from MS Office? > > I'd like to ear you thoughts about this case. > Thanks in advance. Greetings. > > --Nestor > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > IT Handel und Beratung Jrg Volz > Bernhard-Frh-Str. 7 > 77855 Achern > GERMANY > > Tel: +49 (0)7841-681651 > Fax: +49 (0)7841-681654 > Mobil: +49 (0)170-2989757 > > VAT-ID: DE201383541 > > http://www.it-volz.de > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >
I don´t do JAVA /JEE stuff, but try to get rid of that format stuff. (like "insert unformatted text only"). My guess is that it field values get to big or "crazy" characters that lead to your problems. I had those crazy problems once with a CMS running on PHP/mySQL with users inserting Text from Word. Joerg Volz ----------------------------------------------------------------------------- -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of nestor gomez munoz Sent: Wednesday, March 14, 2012 6:31 PM To: ids@iiug.org Subject: RE: CHAR, JDBC and MS Office [26527] It seems the cut includes all of that formater stuff besides the plain char text. El mié, 07-03-2012 a las 10:51 -0500, Joerg Volz escribió: > What does the User past out of Word? Pure ASCII Text, or some of that crazy > formatted stuff Word usually stores while doing a cut&paste? > > Joerg Volz > ----------------------------------------------------------------------------- > > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of nestor > gomez munoz > Sent: Wednesday, March 07, 2012 4:46 PM > To: ids@iiug.org > Subject: CHAR, JDBC and MS Office [26471] > > Hi! > > Im facing with an issue on a java JEE program: > Programmers created CHAR(n) columns on a table, then they have a form > with INPUT fields. This fields are INSERTed or UPDATEd with a JDBC > connection and a prepared statement. > > When users cut text from MS Office Word and paste it in the fields, the > transacction never ends. The INSERT execution stays waiting for > something. It never reports an error or anything. > > We now know that is triggered for bytes in text which give format to it, > on MS Office. When text is filtered to avoid that bytes the insertions > ends normally. > > ¿could it be an IDS bug? ¿JDBC bug? ¿programmer bug? ¿should we filter > all of the fields? ¿should we prohibit cut and paste from MS Office? > > I'd like to ear you thoughts about this case. > Thanks in advance. Greetings. > > --Nestor > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > IT Handel und Beratung Jrg Volz > Bernhard-Frh-Str. 7 > 77855 Achern > GERMANY > > Tel: +49 (0)7841-681651 > Fax: +49 (0)7841-681654 > Mobil: +49 (0)170-2989757 > > VAT-ID: DE201383541 > > http://www.it-volz.de > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum. IT Handel und Beratung Jörg Volz Bernhard-Früh-Str. 7 77855 Achern GERMANY Tel: +49 (0)7841-681651 Fax: +49 (0)7841-681654 Mobil: +49 (0)170-2989757 VAT-ID: DE201383541 http://www.it-volz.de