What is the java.sql.Types equivalent for the MySQL TEXT? -


when using preparedstatement's setobject method column of type text (in mysql db), should last parameter be?

for example, know ok varchar column:

stmt.setobject(i, "bla", types.varchar);

where stmt preparedstatement, , types java.sql.types.

but if db column's type text, should still use varchar? or maybe blob, or clob?

the answer (yes, meant use varchar) can found here:

http://dev.mysql.com/doc/connector-j/en/connector-j-reference-type-conversions.html (updated outdated broken link)

and here info mysql text type

http://dev.mysql.com/doc/refman/5.0/en/blob.html


Comments

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

java - Why is BlockingQueue.take() not releasing the thread? -

jQuery Ajax Render Fragments OR Whole Page -