freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Problem with datetime from a MS SQL Server
- From: "James K. Lowden" <jklowden AT schemamania.org>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Problem with datetime from a MS SQL Server
- Date: Mon, 10 Feb 2003 21:22:32 -0500
On Mon, 10 Feb 2003 16:42:23 -0600, Steve Langasek <vorlon AT netexpress.net>
wrote:
> [second try; sticky keyboards should not make editors segfault.]
Ouch.
> Exposing more options to the user is a poor substitute for good design.
Indeed, no substitute at all. I'm not sure what choice we have, though.
If we want one shared library to behave two ways, that's a runtime option.
If we want one source tree to produce two shared libraries with slightly
different behaviors, that's a configure-time option. I don't see any
inherent disadvantages in the former over the latter. I seem to have
forgot the advantages, however.
> Probably because, as I remembered upon reflection, it's a Microsoftism
> that has only recently been ported to gcc in response to the needs of
> the Wine project. So it's probably not the best route.
I see, thanks. When I was learning C, you needed memcpy to move the
contents of a structure. Sometimes I don't keep up....
> However, since the type of all the members is the same, I don't think
> the added protection against accidental name collisions justifies the
> portability hit. I think it's better to use #defines, like so:
>
> #define dateyear year
> #define datedmonth day
> #define datedyear dayofyear
...
> using the more esoteric of the names for the member as the alias, to
> reduce the chance of colliding with app variable names.
I think we'd live to regret that collision, however remote its probabilty.
> Failing that, it's always possible to double the structure. <shrug>
This is safest, but would need a different answer for binary
compatibility.
--jkl
-
[freetds] Problem with datetime from a MS SQL Server,
Frank M. Kromann, 02/09/2003
- Re: [freetds] Problem with datetime from a MS SQL Server, James K. Lowden, 02/09/2003
- <Possible follow-up(s)>
-
RE: [freetds] Problem with datetime from a MS SQL Server,
Lowden, James K, 02/10/2003
-
Re: [freetds] Problem with datetime from a MS SQL Server,
Steve Langasek, 02/10/2003
- Re: [freetds] Problem with datetime from a MS SQL Server, Brian Bruns, 02/10/2003
-
Re: [freetds] Problem with datetime from a MS SQL Server,
James K. Lowden, 02/10/2003
-
Re: [freetds] Problem with datetime from a MS SQL Server,
Steve Langasek, 02/10/2003
- Re: [freetds] Problem with datetime from a MS SQL Server, James K. Lowden, 02/11/2003
-
Re: [freetds] Problem with datetime from a MS SQL Server,
Steve Langasek, 02/10/2003
-
Re: [freetds] Problem with datetime from a MS SQL Server,
Steve Langasek, 02/10/2003
- RE: [freetds] Problem with datetime from a MS SQL Server, ZIGLIO Frediano, 02/10/2003
- RE: [freetds] Problem with datetime from a MS SQL Server, ZIGLIO Frediano, 02/11/2003
- RE: [freetds] Problem with datetime from a MS SQL Server, Lowden, James K, 02/11/2003
Archive powered by MHonArc 2.6.24.