[freetds] Way to identify freetds.

Frediano Ziglio freddy77 at gmail.com
Sun Feb 21 03:50:19 EST 2021


Il giorno dom 7 feb 2021 alle ore 18:24 Igor Korot
<ikorot01 at gmail.com> ha scritto:
>
> Hi, Frediano,
>
> On Sun, Feb 7, 2021, 4:35 AM Frediano Ziglio <freddy77 at gmail.com> wrote:
>
> > Il giorno dom 7 feb 2021 alle ore 09:57 Igor Korot
> > <ikorot01 at gmail.com> ha scritto:
> > >
> > > Hi, ALL,
> > > Is there a way to differentiate freetds from native Sybase/Microsoft
> > > driver/library?
> > >
> > > Thank you.
> >
> > Hi,
> >   from the client side sure. For ODBC you can simply ask ODBC using
> > SQLGetInfo.
> >
>
> I presume I need SQL_DRIVER_NAME, right?
>

Yes

> For other libraries they have different ABIs so you can check these or
> > check some minor differences in headers/macros.
> >
>
> Could you provide some code, please?
> Or at least tell what to check...
>
>

It should be automatic when you detect FreeTDS header (which are
slightly different).
So something in the "configure" like scripts (depending on the build
system you are using).
Otherwise you can check for specific extensions, like for dblib you
can check presence of
"DBTDS_7_4" macro or the presence of tdsdbopen function.
For ctlib you can check presence of "CS_TDS_74".

>
> > From the server side I'm not sure.
> >
>
> Dont care about that.
>
> Thank you.
>
>
Regards,
  Frediano


More information about the FreeTDS mailing list