freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds][freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types
- From: "Arnar Birgisson" <arnarb AT oddi.is>
- To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds][freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types
- Date: Thu, 8 May 2003 13:23:41 -0000
James and Frediano: Thanks heaps for your explanations, I really
appreciate them (or it? My english needs some polishing). This allows me
to continue using freetds for my project without taking the chance that
things will break if I upgrade (at least if they do, I will know how to
fix them). Understanding this is important to me as I frequently tweak
code to suit my needs.
I would be interested to offer some of my time to help in the
development of FreeTDS, but as things are right now, I don't have much
of it to give :-/
Arnar
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of
> Frediano Ziglio
> Sent: 8. maĆ 2003 06:16
> To: FreeTDS Development Group
> Subject: RE:
> [freetds][freetds-Patches-731907]Choosingdatalengthwhenbinding
> fixed types
>
>
> 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+ ?
> >
> > Arnar
> >
>
> 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:
>
> void
> tds_set_param_type(TDSSOCKET * tds, TDSCOLINFO * curcol,
> TDS_SERVER_TYPE
> type)
> {
> /* translate type to best handle server */
> if (IS_TDS7_PLUS(tds))
> switch(type) {
> case SYBVARCHAR:
> type = XSYBVARCHAR;
> break;
> case SYBCHAR:
> type = XSYBCHAR;
> break;
> case SYBBINARY:
> ...
> case SYBVARBINARY:
> ...
> }
> tds_set_column_type(curcol, type);
> }
>
> Removing cardinal type only from tds_set_param_type isn't a
> good idea...
>
> freddy77
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-
RE: [freetds] [freetds-Patches-731907]Choosingdatalengthwhenbindi ngfixed types,
Lowden, James K, 05/07/2003
-
RE: [freetds] [freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types,
Arnar Birgisson, 05/07/2003
- Re: [freetds] [freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types, James K. Lowden, 05/07/2003
-
RE: [freetds] [freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types,
Frediano Ziglio, 05/08/2003
- RE: [freetds][freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types, Arnar Birgisson, 05/08/2003
-
RE: [freetds] [freetds-Patches-731907]Choosingdatalengthwhenbindingfixed types,
Arnar Birgisson, 05/07/2003
Archive powered by MHonArc 2.6.24.