Subject Re: Error with stored procedure on TIBOQUERY "Can not SELECT RDB$DB_KEY"
Author davissammybr
Thanks for your help !!

--- In IBObjects@yahoogroups.com, "Svein Erling" <svein.erling.tysvaer@...> wrote:
>
> > > I changed the property to readonly but did not work.
> > > Below is the ddl and the query.
> > > Thanks.
> > >
> > > Query with error on TiboQuery:
> > > select
> > > Mylist.paramkey,
> > > Mylist.paramname
> > > from
> > > p_list Mylist
> >
> > You're right, it doesn't work - I could even reproduce it running the query through DB Workbench (3.4.2 Pro). Admittedly, I've never tried aliasing a stored procedure when there's no join involved, and adding a join makes the alias work:
> >
> > select Mylist.paramkey, Mylist.paramname
> > from p_list Mylist
> > join rdb$database rdb on (1=1)
> >
> > I don't know why, though I do think aliases are less important for queries not involving joins.
> >
> > Sorry,
> > Set
>
> I tried a bit more and got things to work by setting KeyLinks to Mylist.paramkey (I assume this will be unique). Admittedly, this was using a TIB_Cursor, something is wrong with my setup, so TIBOQuery doesn't work on this computer, but I would expect it to work for you.
>
> Set
>