Skip to Content.
Sympa Menu

freetds - Re: Unable to retrieve data Linux<->MSSQL 7

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Unable to retrieve data Linux<->MSSQL 7
  • Date: Fri, 11 Jan 2002 11:03:44 -0500


> From: Björn Lantz [mailto:bjorn.lantz AT easyt.com]
> Sent: January 11, 2002 10:40 AM
> Subject: [freetds] Re: Unable to retrieve data Linux<->MSSQL 7
>
> I found out what the problem was. When I check the result column names
> they are all in capital letters! no wonder my strcmp() never found the
> right column, so I am now able to retrieve data from my test
> program in C.
>
> Right now I am having trouble with the date format. I want it in a ISO
> format (YYYY-MM-DD HH:MM:SS), but I keep getting it in
> american(?) format
> (Mar 28 2002 12:00AM) when I bind the column to SQL_C_CHAR type.

Björn,

The driver is free to choose how to bind a datetime to a string; what you're
seeing is what Sybase's db-lib does. To get the format you want, use
CONVERT(varchar(20), COLUMN_NAME, 120) in your SELECT statement.

> Are there any options in freetds to set the locale ?

There's no locale stuff in FreeTDS yet. You can, however, set the client
character set in freetds.conf, which should be helpful if you're storing
non-English text.

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page