Skip to Content.
Sympa Menu

freetds - Re: Sql 7 date

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Curt Hagenlocher" <curt AT hagenlocher.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Sql 7 date
  • Date: Wed, 26 Sep 2001 13:24:29 -0700


"Mark Lontsman" <mark.lontsman AT longbow.com> wrote:

> When I call ResultSetMetaData.getColumnType on the datetime
> field, it throws exception saying that it can't determine the
> type.

The following code works for me:

Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select FOO from bar");
ResultSetMetaData md = rs.getMetaData();
System.out.println(md.getColumnType(1));

It returns a value of 93 (sql.Types.TIMESTAMP) for both
datetime and smalldatetime fields in SQL Server 7.0.

Is this on par with what you're trying?


--
Curt Hagenlocher
curt AT hagenlocher.org




Archive powered by MHonArc 2.6.24.

Top of Page