Re: Long text truncated
Ronald Klop <[email protected]> Wed, 2 May 2007 18:14:55 +0200 (CEST)
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <1996227.7151178122495428.JavaMail.tomcat@localhost> |
Post a real testcase so people can reproduce your problem. A CREATE TABLE statement and a piece of Java code which fails. Ronald. On Fri Apr 27 17:09:27 CEST 2007 "Asensio, Rodrigo" <[email protected]> wrote: > > My insert is truncating the long text. > Mysql 5.0.19 > ConnectorJ 5.5 > Java 5 > > String longtext = "afsdfasd..." // more than 40000 chars, no more than > 65535 > PreparedStatement stmt = ... ... Insert into table values (?, ?) > Stmt.setString(1, "someid"); > Stmt.setByteArray(longtextasStream... Bla bla); > Stmt.executeUpdate(); > > Ok. Here all works cool. But this thing is truncating up to 4096 chars > Field in mysql is TEXT (max 65535) > > I also tried doing this.. > myPreparedStmt.setMaxFieldSize(0); // no limit OR... > myPreparedStmt.setMaxFieldSize(65535); // precise limit > > Keeps inserting 4096 chars. > > Any clue ? > Thanks > R > > > ------------------------------------------------------------------- > Rodrigo Asensio > Fuel Management Services > Gilbarco Veeder Root > phone: +1 336 547 5023 > email: [email protected] > <mailto:[email protected]> > > This message (including any attachments) contains confidential > and/or proprietary information intended only for the addressee. > Any unauthorized disclosure, copying, distribution or reliance on > the contents of this information is strictly prohibited and may > constitute a violation of law. If you are not the intended > recipient, please notify the sender immediately by responding to > this e-mail, and delete the message from your system. If you > have any questions about this e-mail please notify the sender > immediately. > > -- > MySQL Java Mailing List > For list archives: http://lists.mysql.com/java > To unsubscribe: http://lists.mysql.com/[email protected] >