Skip to Content.
Sympa Menu

freetds - Re: [freetds] Some tds_* functions have changed in the last several weeks???

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Some tds_* functions have changed in the last several weeks???
  • Date: 11 Dec 2002 22:29:53 +0100

Il mer, 2002-12-11 alle 21:55, Harrison, Bruce (CXO) ha scritto:
> Hello All!
>
> It appears that some time between November 22, 2002 and today, some
> of the tds_* function definitions have changed. It this documented
> somewhere? Below are a couple of examples that the compiler complained
> about in my code. Maybe I somehow got an old kit on 11/22/02???
>

libtds API changes are not documented (well, there are not a separate
document, only ChangeLog). API are documented using Doxygen tool
(however is still in progress)

> On November 22 (the date I pulled down the kit for the first time)
>
> From tds.h
> TDSSOCKET *tds_connect(TDSLOGIN *login, TDSCONTEXT *context,
> void *parent);
>
> From tdsconvert.h
> TDS_INT tds_convert(TDSCONTEXT *context, int srctype, TDS_CHAR
> *src,
> TDS_UINT srclen, int desttype, TDS_UINT destlen,
> CONV_RESULT *cr);
>
> Today:
>
> int tds_connect(TDSSOCKET *tds, TDSCONNECTINFO *connect_info);
>

This functions prototype was changed mainly to support ODBC dsnless and
freetds.conf'less connections. Previous tds_connect always called
config stuff for reading freetds.conf so this part had been splitted.
TDSCONNECTINFO is the old TDSCONTEXT structure (renamed and added some
fields)

This function prototype changed 3 or 4 time from 0.53 to current CVS...
I hope this is the final prototype.

> TDS_INT tds_convert(TDSCONTEXT *context, int srctype, const TDS_CHAR
> *src,
> TDS_UINT srclen, int desttype, CONV_RESULT *cr);
>

Simply destlen parameter was unused, so we removed it. Is safe to remove
parameter 6 from your code...

This function is suitable to change in next versions (post 0.61, not in
0.61) for supporting direct binding...

I suggest you enable more warning in your compiler and check for
prototype problems...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page