Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problem with datetime from a MS SQL Server

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] Problem with datetime from a MS SQL Server
  • Date: Mon, 10 Feb 2003 00:30:01 -0500 (EST)

Hmmm...typdef'ing SQLCHAR to SYBCHAR probably could be done
unconditionally, however attempting to use ODBC and dblib in the same
.c file would suffer some incompatibility. Incidentally, I run into
this alot with DB2 (SQL/CLI based API) and ctlib/dblib so this is perhaps
nothing new. The stickler is our usage in dblib_handle_err_message which
has no obvious work around, but could be promoted to a runtime check perhaps?
As it stands now we can not have a single freetds installation for sybase
derived dblib code and ms-dblib code. It would be nice to get at least
that far.

On Sun, 9 Feb 2003, Steve Langasek wrote:

> On Sun, Feb 09, 2003 at 11:00:03PM -0500, Brian Bruns wrote:
>
> > I had been thinking about this since I put in the --enable-msdblib option
> > in. We could make the dbdaterec structure hold the values for both
> > sybase
> > and msdblib names and then dbdatecrack can fill in both values, great for
> > source compatibility with both and if we put the sybase stuff first in
> > the
> > structure, binary compat should be no problem (assuming we are shooting
> > for sybase binary compatibility, which is really the only option on *nix
> > platforms). Anyway, point is we could remove the --enable-msdblib option
> > entirely.
>
> That sounds like a good idea to me; then PHP can just check for
> whichever structure member it prefers to use at compile time, and build
> accordingly.
>
> I'm afraid we won't be able to get rid of the MSDBLIB option entirely,
> as it appears people have found this useful in other parts of the code
> as well. As for binary compatibility, it would be good if this change
> made the cut for 0.61: changing the structure size still implies some
> incompatibility, so it would be nice to get this change in for a release
> where we're already bumping the soname.
>
> BTW, would it be worthwhile to use a set of defines or anonymous unions
> within the struct? It would save space and simplify the code a little
> bit, I think; there's really no reason to keep two sets of values for
> those elements that have the same semantics between Sybase and MS.
>
>





Archive powered by MHonArc 2.6.24.

Top of Page