Subject RE: [IBO] Fwd: Re: [Firebird-devel] Firebird 2.1 and text blobs
Author Jason Wharton
Helen,

Thank you for making this more obvious and kudos to Nando for his efforts to
make my life easier.

And, thank you Martijn, though next time, please give me more courtesy. I'd
rather not have issues like this fall through the cracks.

Regards,
Jason Wharton

> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Helen Borrie
> Sent: Wednesday, November 22, 2006 6:29 AM
> To: ibobjects@yahoogroups.com
> Subject: [IBO] Fwd: Re: [Firebird-devel] Firebird 2.1 and text blobs
>
> Sorry, Martijn, I just picked up the bits of that thread and Nando
> seems to have hit the nail on the head, viz. that from 2.1 on you
> will no longer be able to assume that SQLSCALE being non-zero
> indicates that the type is numeric.
>
> Sorry for being a bit hasty on the Send button.
>
> Helen
>
> >Date: Wed, 22 Nov 2006 11:53:34 +0100
> >From: Nando Dessena <nando@...>
> >Subject: Re: [Firebird-devel] Firebird 2.1 and text blobs
> >
> >Martijn, Dmitry,
> >
> > >> Is it IBObjects, DBW or Firebird that causes this?
> >
> >D> Firebird now returns the BLOB charset in XSQLDA. As there
> were no room
> >D> for this information, it's being returned in sqlscale
> (previously it
> >D> always contained zero for blobs).
> >
> >D> So it seems to me that IBO thinks that if sqlscale is not
> zero, then
> >D> this cannot be a blob (even if the reported datatype is SQL_BLOB).
> >
> >D> I could give you a more precise answer if you provide me
> with the source
> >D> code for IBO.
> >
> >I only have a very old version of IBO as I don't use it anymore, but
> >judging from a very quick glance Dmitry's guess is correct. From
> >IBODataset.GetDataTypeAndSize (which I assume is only used in the
> >TDataSet-compatible layer):
> >
> > if SQLScale <> 0 then
> > begin
> > NewDataType := ftFloat;
> > case SQLType of
> > SQL_FLOAT,
> > SQL_FLOAT_,
> > SQL_DOUBLE,
> > SQL_DOUBLE_: ;
> > else
> > if IsCurrencyDataType then
> > begin
> > NewDataType := ftBCD;
> > NewDataSize := -SQLScale;
> > end;
> > end;
> > end
> > else
> > // here many other SQLTypes - including blobs - are processed.
> >
> >The above suggests that if there's a scale <> 0 then it must
> be either
> >ftFloat or ftBDC. The IBO "native" layer might have the same problem.
> >
> >HTH
> >--
> >Nando Dessena
> >