Skip to Content.
Sympa Menu

freetds - Re: dbrows missing...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brian Bruns" <camber AT ais.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: dbrows missing...
  • Date: Wed, 28 Aug 2002 17:14:29 -0400


> > From: Brian Bruns [mailto:camber AT ais.org]
> > Sent: August 28, 2002 3:36 PM
> >
> > I suspect that at some time in the past the DBROWS macro directly mucked
> > with the dbprocess to return a result. The function was probably
> > introduced later in an attempt to clean things up,
>
> Brian,
>
> Thanks, I see. You suspect that in making DBPROCESS opaque, Sybase added
> functions to get/set things in it, functions whose job was originally done
> by macros. Maybe in some protosybase, there was no macro at all, and you
> were expected to address the structure directly?

Not exactly, but that the DBROWS() macro did this and there was no
dbrows() at the time. Anyway, by the time Sybase figured out that it
really should be a function and not a macro, they had legacy code to
contend with.

> > but the dbrows()
> > function AFAIK was never published in the documentation and the only
> > reason it appears in code is because people look at the
> > headers and short circuit the code, perhaps thinking it will be faster.
>
> There's another reason. People who spend their days with SQL Server on NT
> read Microsoft's documentation (well, some do) and MS's dblib uses lowercase
> function names thoughout, no macros provided. There's an exception:
> DBSETLUSER() and friends, the functions that set up the LOGINREC, are all
> uppercase. Go figure.

If ms dblib supports this structure then that's one more reason to do it.

> My bet is that by the time MS licensed Sybase's 4.2 code, DBROWS() etc. had
> already become simple pass-throughs, so MS tossed them out in the name of
> incompatibility^Wsimplicity. Whereas DBSETLUSER() etc. call dbsetlname()
> sparing the user a parameter, so they kept those. Anyway, that's my
> dataless theory.

A good theory to be sure. "Never attribute to malice that which can be
explained by simple incompetence". ;-)

> Regards,
>
> --jkl

<taunt>Haven't convinced your company to drop the legalese yet eh?</taunt>


Brian




Archive powered by MHonArc 2.6.24.

Top of Page