Thank you. In my RDB$FORMATS table, I have a single record. The
RDB$RELATION_ID field is equal to 128, and the RDB$FORMAT field is equal to
1. But what I really want to know is, can you help me extract the data from
the RDB$DESCRIPTOR field, which is a BLOB? I got to extract information
about the first field by casting a substring as a VARCHAR, and got a clear
description of the field's length. But I cannot do the same for the other
fields.
On Sun, Nov 30, 2014 at 6:38 PM, Ann Harrison <aharri...@nimbusdb.com>
wrote:
>
>
> > On Nov 30, 2014, at 6:35 PM, Stuart Simon <stuart...@gmail.com> wrote:
> >
> > OK, but version numbers tell me nothing. What I am looking for is an
> explanation of how Firebird (the package) can tell which bytes belong to
> which fields. Somehow Firebird must be able to tell the difference between
> the following two records:
> >
> > FirstName LastName
> > 'Jim' 'Starkey'
> > 'Jim Starkey' ''
> >
> >
> > It may well be that it was coded in the Interbase days and has not been
> looked up until now. Or maybe it's the blob in the "RDB$DESCRIPTOR" field,
> in which case I do not know how to decode it into text.
> >>
>
> No. The format of the record is included in the record header, which is
> described in ods.h. Use that number to look up the record in RDB$FORMATS.
> That tells you how long each field is - uncompressed. On disk, each record
> is compressed using a run lenth compression of the whole record. The first
> byte is a length. If it's positive, the next <n> bytes are data. If
> negiative, the next <n> bytes are the following byte value. E.g. 0x3,
> 'Jim', 0x-20, ' ', 0x7, 'Starkey', 0x23, ' ' etc. would be Jim(17
> spaces)Starkey. That would correspond to FirstName 23, LastName 30.
>
> Good luck,
>
> Ann
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
--
Stuart Simon
stuart...@gmail.com
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel