Skip to Content.
Sympa Menu

freetds - Re: [freetds] I can't get the datatype DATE correctly using odbc, anyone can help me?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] I can't get the datatype DATE correctly using odbc, anyone can help me?
  • Date: 09 Jan 2003 16:19:11 +0100

Il gio, 2003-01-09 alle 15:43, James K. Lowden ha scritto:
> On Wed, 8 Jan 2003 17:09:52 -0500, "Ou Liu" <ou AT qbt.com> wrote:
> > I am using FreeTDS/iODBC to get some date from a MSSQL2K Server,
> > however I
> > met problem when I try to get data of type DATE. Here is my problem
> > (1) I am using SPARC/Solaris 8 as client machine, iODBC as driver
> > manager,
> > FreeTDS as odbc driver, MSSQL2K on another Win2K machine as server.
> > (2) I create a table 'test' on the MSSQL2k:
> > CREATE TABLE test (dtm DATETIME);
> > INSERT INTO test VALUES("2002-02-23 10:02:03");
> > (3) Now I use the tsql to fetch the whole table :
> > SELECT * FROM test;
> > Everything runs ok, I got what I need.
> > (4) But When I try to use ODBC API to get it:(the m_hstmt is ok, I
> > am sure)
>
> Ou,
>
> Could you please submit a src/odbc/unittest that illustrates what you're
> doing? You've defined a very narrow problem in C that should work but is
> subject to Endian breakage. Someone else might well want to do the same
> thing and benefit from your example. And a simple test program would make
> it easy to debug your problem.
>
> You don't even have to create a temporary table (though of course you
> can). Your query could be just "select getdate()".
>
> If you do that, I'll add your program to the distribution and make it
> work.
>
> Regards,
>

Test added (but not working...)

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page