Skip to Content.
Sympa Menu

freetds - Product version

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "Freetds (E-mail)" <freetds AT franklin.metalab.unc.edu>
  • Subject: Product version
  • Date: Thu, 19 Sep 2002 17:59:53 +0200


Due to a require on libtds I added code for retrieve product version

I added a product_version field to TDS_SOCKET and these macro

TDS_IS_SYBASE(x)
Check if product is Sybase (Adaptive Server Enterprice)
x should be a TDS_SOCKET*

TDS_IS_MSSQL(x)
Check if product is Microsoft SQL Server
x should be a TDS_SOCKET*

TDS_MS_VER(maj,min,x)
Calc a version number for mssql
Use with TDS_MS_VER(7,0,842)

TDS_SYB_VER(maj,min,x)
Calc a version number for Sybase

TDS_*_VER return just full number.
For test for a range of version you can use check like
if (tds->product_version >= TDS_MS_VER(7,0,0) && tds->product_version <
TDS_MS_VER(8,0,0))
...

I don't like very much these macro... if someone has best idea...

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================



  • Product version, ZIGLIO Frediano, 09/19/2002

Archive powered by MHonArc 2.6.24.

Top of Page