Skip to Content.
Sympa Menu

freetds - Re: [freetds] dbdatecrack producing erroneous results

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] dbdatecrack producing erroneous results
  • Date: Tue, 24 Apr 2012 15:53:21 -0400

On Tue, 24 Apr 2012 14:04:58 -0400
Ken Collins <ken AT metaskills.net> wrote:

>
> https://github.com/rails-sqlserver/tiny_tds/blob/master/ext/tiny_tds/tiny_tds_ext.h#L4-5
>
> From my README on the project.
>
> I want to configure FreeTDS using --enable-msdblib and/or
> --enable-sybase-compat so it works for my database. ...
> you do not NEED
> to use any of these, nor will they hurt anything since we control
> what C structure names we use and this has no affect on what database
> you use!

How do you deal with the fact that Microsoft defines dbdatecrack() to
return months 1-12 and Sybase uses 0-11?

--enable-msdblib emulates Microsoft's definition of DB-Library. It
changes (from memory):

1. names of members of the datetime structure
2. range of months for dbdatecrack()
3. timeout/exit behavior in the error handler

Use of --enable-msdblib is best determined by the programmer's
expectation of how db-lib works. If there is existing code, the smart
programmer will adapt his expectation to that of the code. ;-)

For those following along at home, please note that --enable-msdblib
affects the API *only*. It doesn't change the protocol. FreeTDS can
connect to any TDS server with or without that option configured.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page