Subject Fwd: Re: [Firebird-devel] Firebird 2.1 and text blobs
Author Helen Borrie
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
>
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys - and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>Firebird-Devel mailing list, web interface at
>https://lists.sourceforge.net/lists/listinfo/firebird-devel