Storing HTML in MySQL using Java
Posted
by mpcabd
on Stack Overflow
See other posts from Stack Overflow
or by mpcabd
Published on 2010-06-07T22:38:46Z
Indexed on
2010/06/07
22:42 UTC
Read the original article
Hit count: 209
Hello there again,
So, I'm working on a project now where I should store webpages inside a database, I'm using crawler4j to crawl and Proxool along with MySQL Java Connector to connect to my database.
When I tested the application I got: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'HTMLData'
.
The HTMLData
column wasTEXT
.
When I changed the HTMLData
column to LONGTEXT
the error was gone, but I'm afraid it might get back in the future.
Any idea on how to do that perfectly so I don't worry about that error (or any other similar error) in the future?
Thanks :)
© Stack Overflow or respective owner