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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -