[freetds] [freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types
freddyz77 at tin.it
Thu May 8 02:14:28 EDT 2003
Il mer, 2003-05-07 alle 17:43, Arnar Birgisson ha scritto:
> > Hope that clears things up a bit. :-)
> It does indeed.. thanks.
> According to this though, is that tds_set_column_type should have
> checked to see if we're speaking tds 7+ and in that case map SYBVARCHAR
> to XSYBVARCHAR, and vice versa for lower versions of the protocol? Is
> there any reason to keep the ability to specify SYBVARCHAR (the old one)
> explicitly when talking tds 7+ ?
Well, you as client didn't know the protocol version you are talking...
You call dblib passing SQLVARCHAR (or whatever constant) and
libTDS/DB_Library should do all necessary to pass XSYBVARCHAR.
tds_set_column_type was written to set type from server but used
nowadays to set type TO server. If is our intention to set param type we
should do a wrapper in libTDS like this:
tds_set_param_type(TDSSOCKET * tds, TDSCOLINFO * curcol, TDS_SERVER_TYPE
/* translate type to best handle server */
type = XSYBVARCHAR;
type = XSYBCHAR;
Removing cardinal type only from tds_set_param_type isn't a good idea...
More information about the FreeTDS