Database name from Stored Procedure.
Posted in 1999
Topics: Stored Procedures & SPL
Is there a way to obtain the current opened database from within a stored procedure?
PAUL HOWARD wrote: > Is there a way to obtain the current opened database from within a > stored procedure? Yes. I do believe this has been covered in the last 6 months (and probably less than that). Please could you try to find the information in the news group archives, eg at Deja.com or at the IIUG site (http://ww.iiug.org/). -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>
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