Home » Developer & Programmer » Forms » userenv command (Oracle 9i)
userenv command [message #416372] Sat, 01 August 2009 04:01 Go to next message
GKANAND
Messages: 17
Registered: June 2009
Junior Member
Hi

The below query is executing in sql*plus. But the same is giving
error in forms 6i.

Query:
SELECT UPPER(SYS_CONTEXT('USERENV','SESSIONID')) FROM DUAL;

Error:
identifier 'SYS_CONTEXT' must be declared.

What is the solution to run in forms 6i.

Re: userenv command [message #416373 is a reply to message #416372] Sat, 01 August 2009 04:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use USERENV('SESSIONID')

Regards
Michel
Re: userenv command [message #416374 is a reply to message #416373] Sat, 01 August 2009 04:19 Go to previous messageGo to next message
GKANAND
Messages: 17
Registered: June 2009
Junior Member
Dear Michal,

I need the database name (SID NAME ).
Re: userenv command [message #416396 is a reply to message #416374] Sat, 01 August 2009 09:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is the relation with the first question?

Do you want database name or instance name?

Regards
Michel
Re: userenv command [message #416409 is a reply to message #416372] Sat, 01 August 2009 11:56 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If SYS_CONTEXT is not visible in your Forms version, perhaps you could create a database function (it would contain exactly the same SELECT statement you've successfully executed in SQL*Plus) and then call this function from a form.
Previous Topic: Record not saved
Next Topic: new canvas pulling from child to parent (merged 3) 10g
Goto Forum:
  


Current Time: Fri Sep 20 09:51:31 CDT 2024