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
Comments
Post a Comment