freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Réf. : [freetds] How many people use the JDBC driver?
- From: "Cedric Dumetz" <Cedric.Dumetz AT eolas.fr>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Réf. : [freetds] How many people use the JDBC driver?
- Date: Wed, 20 Jun 2001 10:41:26 +0200
Hello I use the JDBC driver to develop a futur french site about
city-commerce
Unfortunatly I've got a big problem to get String column value.
Indeed if I declare a column with the datatype Varchar(1000), when I call
tghe method getString of the ResultSet the string is cut to 255.
So, if I declare this column with the datatype Text, I don't have this
probleme. However, in this case when I use the result in the method
setString, and after I do executeQuery(), I've got the error "String too
long"
So my question is : "What is the solution to obtain and use a string bigger
than 255 char"
Thanks
Cedric
Example of my code:
pstmt = conn.prepareStatement("insert into myTable2(MyColumn2) values(?)");
rs = stmt.executeQuery("select MyColumn1 from MyTable1");
rs.next();
s = rs.getString("MyColumn1"); /* if MyColumn1 is Varchar(1000), s
is truncated to 255 char) */
pstmt.setString(1, s);
pstmt.executeUpdate(); /* if MyColumn1 is Text, it's throw the error "too
long string" */
- Réf. : [freetds] How many people use the JDBC driver?, Cedric Dumetz, 06/20/2001
Archive powered by MHonArc 2.6.24.