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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -