Skip to Content.
Sympa Menu

freetds - SQL and Java datatypes in FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Fabio Galarraga" <fabio AT mrree.gub.uy>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: SQL and Java datatypes in FreeTDS
  • Date: Mon, 8 Jan 2001 14:52:30 -0500


Hi to all:
I'm using freetds_jdbc.snapshot.jar with JDK 1.2.2 to connect a SQL
Server.
I have the following Java code:

.....
int number;

Class.forName ("com.internetcds.jdbc.tds.Driver");
Connection con = DriverManager.getConnection (url, user, password);
Statement stmt = con.createStatement ();
ResultSet rs = stmt.executeQuery (consulta);
if (rs.next ()){
number=rs.getInt(1)+1;
.....

When I run this code, the last line generate a SQLException with error:
"Internal error. Don't know how to convert from java.sql.Types DECIMAL to
an long"

This code works with ODBC-JDBC driver.

What's the problem?
Is getInt method implemented in freetds_jdbc.snapshot.jar?


Best regards,
Fabio Galarraga
fabio AT mrree.gub.uy




Archive powered by MHonArc 2.6.24.

Top of Page