Subject Re: [IBO] rdb$db_key in a select
Author stewartbourke
Not all tables have a primary key. I want to have a standard way of
referencing a lot of different tables to calculate checksums for
records. Instead of adding an autoincremet to each field, it would
be very helpful if I could access the RDB$DB_KEY for this.

My question is realyl that if the facility is present, and I can see
from other messages that one would appear to be able to use it, how
do I get access to the RDB$DB_KAY in my code. I understand your
comments about the use of primary keys, but, for various reasons, I
need access to the RBD$DB_KAY.

Stewart Bourke

--- In IBObjects@y..., lester@l... wrote:
> > with dmMain, quGeneral,Sql do
> > begin
> > Clear;
> > Add('select RDB$DB_KEY, PRD_CODE from products');
> > Prepare;
> > Open;
> > end;
> If PRD_CODE is your primary key on products, then DB_KEY
> will not be added and you simply use the PRD_CODE value -
> IBO takes care of the rest.
> Why do you think that you want to use DB_KEY?
> --
> Lester Caine
> -----------------------------
> L.S.Caine Electronic Services