Subject | Re: [IBO] rdb$db_key in a select |
---|---|
Author | stewartbourke |
Post date | 2002-07-11T07:30:15Z |
Jason,
Thanks for that. However, I stil have a problem. I have the
following code:
with dmMain, quGeneral,Sql do
begin
Clear;
Add('select RDB$DB_KEY, PRD_CODE from products');
Prepare;
Open;
end;
KeyVal:=dmMain.quGeneral.FieldByName('RDB$DB_KEY').AsString;
This generates an exception - field RDB$DB_KEY not found.
IF I change it to:
KeyVal:=dmMain.quGeneral.FieldByName('DB_KEY').AsString;
I get the same exception, with the field DB_KEY not found.
I am using an IBOQuery.
Any ideas?
Thanks,
Stewart Bourke
Thanks for that. However, I stil have a problem. I have the
following code:
with dmMain, quGeneral,Sql do
begin
Clear;
Add('select RDB$DB_KEY, PRD_CODE from products');
Prepare;
Open;
end;
KeyVal:=dmMain.quGeneral.FieldByName('RDB$DB_KEY').AsString;
This generates an exception - field RDB$DB_KEY not found.
IF I change it to:
KeyVal:=dmMain.quGeneral.FieldByName('DB_KEY').AsString;
I get the same exception, with the field DB_KEY not found.
I am using an IBOQuery.
Any ideas?
Thanks,
Stewart Bourke
--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> For some reason InterBase changes the name to DB_KEY and strips off
the RDB$
> prefix.
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "stewartbourke" <stewartbourke@e...>
> To: <IBObjects@y...>
> Sent: Wednesday, July 10, 2002 4:05 PM
> Subject: [IBO] rdb$db_key in a select
>
>
> > I have an iboquery, and I am trying to do something like:
> >
> > select rdb$db_key from products;
> >
> > If I put this sql into the query and execute it, if I try
> >
> > fieldbyname('rdb$db_key').AsString I get an exception saying the
> > fieldname does nto exist
> >
> > Can I reference the rdb$db_key field in the IBOquery components?
If
> > so, could anybody give me an example of how I can do this?
> >
> > Thanks,
> >
> > Stewart Bourke