Home » Developer & Programmer » Forms » Connecting to different schemas in one menu (Forms6i,Oracle 8i)
Connecting to different schemas in one menu [message #315833] Tue, 22 April 2008 22:55 Go to next message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
Dear all,
I have a menu in which all the forms and reports are connected to scott schema but there is one form which i want to connect to hr schema.

Any help will be appreciated.

Regards,
Kashif Ali
Re: Connecting to different schemas in one menu [message #315857 is a reply to message #315833] Wed, 23 April 2008 00:44 Go to previous messageGo to next message
athar.fitfd@hotmail.com
Messages: 193
Registered: October 2007
Location: pakistan
Senior Member
i think you have to relogin at
When New Form Instance Trigger

and log out while exiting
and login to scott again.
Re: Connecting to different schemas in one menu [message #315866 is a reply to message #315857] Wed, 23 April 2008 01:25 Go to previous messageGo to next message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
that's what i want to know that how to connect to different schema using pl/sql in When-new_form_instance trigger

Regards,
Kashif Ali
Re: Connecting to different schemas in one menu [message #315876 is a reply to message #315833] Wed, 23 April 2008 01:56 Go to previous messageGo to next message
athar.fitfd@hotmail.com
Messages: 193
Registered: October 2007
Location: pakistan
Senior Member
Enter this in When-new-form_instance

logon('userid','password@dbstring');
Re: Connecting to different schemas in one menu [message #315879 is a reply to message #315876] Wed, 23 April 2008 02:10 Go to previous messageGo to next message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
thanks for you reply brother but that does't seems to be working,
am i missing something.

Regards,
Kashif Ali
Re: Connecting to different schemas in one menu [message #315887 is a reply to message #315876] Wed, 23 April 2008 02:22 Go to previous messageGo to next message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
Thanks for your reply but brother that does't seems to be working, and also the database which i m connecting to is a remote database.

Regards,
Kashif Ali
Re: Connecting to different schemas in one menu [message #315969 is a reply to message #315833] Wed, 23 April 2008 06:35 Go to previous messageGo to next message
athar.fitfd@hotmail.com
Messages: 193
Registered: October 2007
Location: pakistan
Senior Member
Dear .

Infact you need to write the above code in

OnLogin Trigger of the form at form level.

tell me if this helps
Re: Connecting to different schemas in one menu [message #316149 is a reply to message #315969] Wed, 23 April 2008 23:18 Go to previous messageGo to next message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
on-logon trigger i have written this but still asking me for a logon

declare
uname varchar2(10);
pass varchar2(10);
begin
uname := 'scott';
pass := 'tiger';
logon(uname, pass || '@orcl');
end;

can you identify what wrong with this
Thanks in advance

Regards,
Kashif Ali
Re: Connecting to different schemas in one menu [message #316175 is a reply to message #315833] Thu, 24 April 2008 02:37 Go to previous message
athar.fitfd@hotmail.com
Messages: 193
Registered: October 2007
Location: pakistan
Senior Member
User the right syntax as i mentioned before

logon('scott','tiger@orcl');

This should work.


ok bye

Athar
Faisalabad Pakistan.
Previous Topic: Sequence Number
Next Topic: "unable to insert or update a view"
Goto Forum:
  


Current Time: Sun Dec 04 21:05:31 CST 2016

Total time taken to generate the page: 0.03961 seconds