Subject How to use DB_KEY from Delphi?
Author pepmallorca
I can use the DB_KEY in stored procedures defining the variable of
the type CHAR(8), but if I don't want to use it in a stored
procedure, and select it with a cursor from Delphi, and then use it
for do an UPDATE, for example with IBDSQL, what kind of datatype I
have to use?

types: String doesn't works, varchar(8) doesn't works

If I use from the program IBSQL, for example, with:

select rdb$db_key from table:

I see a number like:


but If I write the next code:

update table set field_x=999 where rdb$db_key='890000000D000000'

it doesn't works, I suppose because the DB_KEY(8) type is not
compatible with string.

I get DB_KEY works only with stored procedures.

A lot of problems with DB_KEY, but I think it's a good thing to solve
it, isn't it?


" I have seen some very interesting articles like: 'The mystery of
rdb$db_key' but I don't find solution for the problems posted here "