[freetds] [ freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types

Frediano Ziglio freddyz77 at tin.it
Tue May 6 08:09:49 EDT 2003


Il mar, 2003-05-06 alle 13:20, Arnar Birgisson ha scritto:
> Hello there..
> 
> > 1.  Copy tds_set_column_type to a new function, say, 
> > tds_set_param_type
> > 2.  Remove tds_get_cardinal_type() from tds_set_param_type (just use
> > 'type')
> > 3.  Modify param_info_alloc to call tds_set_param_type()
> 
> I did exactly this. After making this small change to the client (in
> this case php):
> -#define SQLVARCHAR SYBVARCHAR
> +#define SQLVARCHAR XSYBVARCHAR
> 

This patch lead to portability problem...

> this worked perfectly. I haven't tried it extensively, but I ran a
> procedure which silently accepted a varchar field with well over 400
> characters.
> 
> The patch is attached.
> 

James, do you agree with this patch?
IMHO is not so good. Or we remove the cardinal type from
tds_set_column_type (and perhaps column_type from TDSCOLINFO) and change
all other code to handle all types or we use tds_set_column_type for
params...

freddy77





More information about the FreeTDS mailing list