Long text truncated

"Asensio, Rodrigo" <[email protected]> Fri, 27 Apr 2007 08:09:27 -0700
Newsgroups gmane.comp.db.mysql.java
Message-ID <A18F7107CFE62843A38F8F4D3954B95A014EE762@dhrseasvxb04.messaging.danaherad.com>
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]