RE: Database name from Stored Procedure.
Posted in 1999
Topics: Stored Procedures & SPL
Thank you very much Rudy. This works great. Do you know how I can get the
current server name as well?
> ----------
> From: Rudy Fernandes[SMTP:rferdy@americasm01.nt.com]
> Reply To: Rudy Fernandes
> Sent: Tuesday, November 23, 1999 5:56 PM
> To: informix-list@iiug.org
> Subject: Re: Database name from Stored Procedure.
>
> PAUL HOWARD wrote:
>
> > Is there a way to obtain the current opened database from within a
> > stored procedure?
>
> Here's one way :
>
> select odb_dbname from sysmaster:sysopendb
> where odb_sessionid = dbinfo('sessionid')
> and odb_iscurrent = 'Y';>
> HTH
> Rudy
>
>
>
Howard, Paul schrieb:
>
> Thank you very much Rudy. This works great. Do you know how I can get the
> current server name as well?
What about selecting "sysconfig" ?
SELECT cf_effective
FROM sysmaster:informix.sysconfig
WHERE cf_id = 2
Bye, Chris