Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Map a Text type defined in SQL Server table to a Java type

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-25 : 21:44:15
Sonica writes "Hello,

I am trying to store a string greater than 255 characters long in a column in my SQL Server table. Unfortunately, when I define it as a VARCHAR datatype in my SQL Server table, when I use PreparedStatement to setString() using Java 2.0, it truncates my string to a length of 255. I am using JDBC to hook up with the database. I cannot find some appropriate way to use a Java type to set a string greater than 255 characters into my column using Java 2.0's setString(). Please help me out with this - I'd really like to set a String of more than 255 chars into my column which is of datatype VARCHAR. I am using the BEA Weblogic's JDriver to connect to the SQL Server db.

Thanks a lot!"
   

- Advertisement -