Skip to Content.
Sympa Menu

freetds - RE: [freetds] [ freetds-Patches-731907 ]Choosingdatalengthwhenbin ding fixed types

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] [ freetds-Patches-731907 ]Choosingdatalengthwhenbin ding fixed types
  • Date: Mon, 05 May 2003 21:13:25 -0000

Il lun, 2003-05-05 alle 20:19, Lowden, James K ha scritto:
> > -----Original Message-----
> > From: ZIGLIO Frediano [mailto:Frediano.Ziglio AT vodafoneomnitel.it]
> > Sent: May 5, 2003 8:48 AM
> >
> > 0010 73 00 61 00 76 00 65 00 5f 00 70 00 65 00 72 00
> > |s.a.v.e. _.p.e.r.|
> > 0020 73 00 69 00 73 00 74 00 65 00 6e 00 74 00 64 00
> > |s.i.s.t. e.n.t.d.|
> > 0030 61 00 74 00 61 00 00 00 05 40 00 64 00 61 00 74
> > |a.t.a... @.d.a.t|
> > 0040 00 61 00 00 27 04 04 59 54 6f 78 4f 6e 74 7a 4f
> > |.a..'..Y ToxOntzO|
> >
> > 27 04 04... FreeTDS it's trying to use old varchar (limited
> > to 255), this is the problem...
>
> And the reason is dbrpcsend:
>
> calls param_info_alloc
> calls tds_set_column_type
> calls tds_get_cardinal_type
>
> which maps xvarchar -> varchar:
>
> case XSYBNVARCHAR:
> case XSYBVARCHAR:
> return SYBVARCHAR;
>
> and is really very broken, I think, wtr iconv.
>
> I wonder about this "cardinal type" concept. Is is necessary?
>

Hi James.
This is a very good question.
I think we need this function to have a "FreeTDS type"... However if all
function handle XVARCHAR like VARCHAR there is no difference... Also how
to handle NVARCHAR... This type is different from VARCHAR but the
cardinal type is the same...

query.c use on_server.column_type for type to send to server, so it's a
good idea to use tds_set_column_type to set column type (some type ago
we used TDSCURCOL.column_type). Problem is how type to send. If a
library send VARCHAR wire should be coded with VARCHAR for Sybase/tds4.2
and XVARCHAR for tds7+. But who should handle this problem? Client
libraries or libTDS? IMHO libTDS (all library should use same
behavior).. ODBC handle this problem itself...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page