frm-40514 [message #474626] |
Tue, 07 September 2010 12:20 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aj_aaron2002
Messages: 15 Registered: August 2010 Location: London
|
Junior Member |
|
|
Hello Dear Friends,
Am running forms 10g on windows vista service pack 1 and am having problems with the FRM-40514 error. (Operation requires a database connection).
I can connect quite alright from form builder, but when i run a form it request for login credentials again. I dont understand why this is so, when am already logged on in form builder.
I tried to tacke this by creating the following code:
DECLARE
Uname VARCHAR2(80);
Pword VARCHAR2(80);
cn VARCHAR2(80);
BEGIN
--pause;
--logout;
--message ('Logging out');
--synchronize;
uname:= USER;
Pword:= PASSWORD;
cn := CONNECT_STRING;
Pause;
message ('Logging on'); synchronize;
Logon(Uname,Pword||'@cn');
IF NOT FORM_SUCCESS then
RAISE FORM_TRIGGER_FAILURE;
MESSAGE('Having problems logging on');
SYNCHRONIZE;
END IF;
EXCEPTION
WHEN OTHERS then GET_CONNECT_INFO(uname,pword,cn);
END;
This code suppreses the logon screen and runs the form without logging on to the database. I know this because when I try to enter and execute query it brings up the message: FRM-40514: Operation requires a database connection.
Please help.
Thanks in anticipation.
|
|
|
Re: frm-40514 [message #474627 is a reply to message #474626] |
Tue, 07 September 2010 12:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
uname:= USER;
Pword:= PASSWORD;
cn := CONNECT_STRING;
What are user, password and connect_string here?
IF NOT FORM_SUCCESS then
RAISE FORM_TRIGGER_FAILURE;
MESSAGE('Having problems logging on');
SYNCHRONIZE;
END IF;
Raise FORM_TRIGGER_FAILURE forces execution straight to the exception handler. So that message and synchronize will never run.
|
|
|
Re: frm-40514 [message #474630 is a reply to message #474627] |
Tue, 07 September 2010 13:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aj_aaron2002
Messages: 15 Registered: August 2010 Location: London
|
Junior Member |
|
|
Thanks alot for your prompt response. I believe forms should read the part of the on-logon trigger that states logon(uname,pword,||'@cn'), before getting to the form trigger failure part. I have a program unit get_connect_info which has the following code:
PROCEDURE Get_Connect_Info( the_username IN OUT VARCHAR2,
the_password IN OUT VARCHAR2,
the_connect IN OUT VARCHAR2)
IS BEGIN
the_username := Get_Application_Property(USERNAME);
the_password := Get_Application_Property(PASSWORD);
the_connect := Get_Application_Property(CONNECT_STRING);
END;
From the on-logon trigger I call this procedure in the exception handler.
USER, PASSWORD, and CONNECT_STRING are oracle forms variables that supplies the current user,password and the connect_string of the said connection.
I was trying to deduce this but just wasn't sure how to go about it.
Thanks again.
Aj
|
|
|
Re: frm-40514 [message #474635 is a reply to message #474630] |
Tue, 07 September 2010 13:45 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
User I believe is a database function rather than forms variable - it does indeed return the current connected user, hence I'm really not sure why you're trying to refer to it before you've logged in.
I'm not sure about the other two - never used them, can't find anything in help about them, but I suspect the same problem applies.
Try using message to display their values.
|
|
|
|
Re: frm-40514 [message #474693 is a reply to message #474639] |
Wed, 08 September 2010 04:31 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Having read up on this I really don't understand why you've written any code at all.
What do you think this code is going to do?
|
|
|
Re: frm-40514 [message #474732 is a reply to message #474693] |
Wed, 08 September 2010 09:08 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aj_aaron2002
Messages: 15 Registered: August 2010 Location: London
|
Junior Member |
|
|
Hello Cookiemonster,
I think I need the code because without the code the form is not loading but
throwing a tns-12560 protocol adapter error. Please shed more light on this if you can.
I will be very delighted to get my form builder running properly.
Thanks in anticipation.
cheers
Aj.
|
|
|
Re: frm-40514 [message #474733 is a reply to message #474732] |
Wed, 08 September 2010 09:11 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You should have said so in the first place. I suspect that all that code has done is mask the error.
Can you connect to the DB using sqlplus from your machine?
|
|
|
Re: frm-40514 [message #474736 is a reply to message #474733] |
Wed, 08 September 2010 10:26 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aj_aaron2002
Messages: 15 Registered: August 2010 Location: London
|
Junior Member |
|
|
Yes, I can connect to the sqlplus from my machine and
I can also connect to the database from the Form Builder.
The only issue is that when I run a form from form builder it loads the
browser and throws the tns-12560 protocol adapter error.
Then when I acknowledge the message it brings up the logon screen.
I don't understand this!!
Thanks Cookiemonster for your help.
Cheers
Aj
|
|
|
Re: frm-40514 [message #474739 is a reply to message #474736] |
Wed, 08 September 2010 10:36 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Me neither.
If you enter your credentials in the logon screen does it then work (assuming you've remove the code above)?
|
|
|
Re: frm-40514 [message #474754 is a reply to message #474739] |
Wed, 08 September 2010 11:37 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aj_aaron2002
Messages: 15 Registered: August 2010 Location: London
|
Junior Member |
|
|
Thanks Cookiemonster,
When I enter my credentials in the logon screen, ie my username and password,
it comes back with the error tns-12560 protocol adapter error.
But wehn I add the connect string eg user/password@connect_string. It throws another error
stating ORA-12154 :TNS: could not resolve connect identifier specified.
And comes back again with the logon screen.
I checked my tnsnames.ora file and it looks like this:
# tnsnames.ora Network Configuration File: C:\DevSuiteHome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ajayia-PC)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PLSExtProc)
)
)
The only issue here is that i believe my SID is ORCL and not PLSExtProc.
Because I cannot connect with PLSExtProc. But this file was generated by oracle.
Secondly my sqlnet.ora file looks like this:
# sqlnet.ora Network Configuration File: C:\DevSuiteHome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, EZCONNECT, ONAMES, HOSTNAME)
Thanks in anticipation, cookiemonster.
Cheers
Aj
|
|
|
Re: frm-40514 [message #474756 is a reply to message #474754] |
Wed, 08 September 2010 11:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Have you got more than one tnsnames.ora file on your PC?
I take it the DB is on your PC as well?
|
|
|
Re: frm-40514 [message #474760 is a reply to message #474756] |
Wed, 08 September 2010 12:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aj_aaron2002
Messages: 15 Registered: August 2010 Location: London
|
Junior Member |
|
|
I only have one tnsnames.ora file on my machine i.e(laptop) and the db is on the laptop as well,i.e (TOSHIBA Laptop).
Running on windows Vista service pack 1.
Thanks for the prompt reply.
Cheers
Aj
|
|
|
|
Re: frm-40514 [message #474804 is a reply to message #474776] |
Thu, 09 September 2010 01:31 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aj_aaron2002
Messages: 15 Registered: August 2010 Location: London
|
Junior Member |
|
|
Its home version, but its working fine now .
I just edited the tnsnames.ora file to include ORCL as a
service name or SID and edited the Hostname, saved the file and rebooted so that registry can read it.
In case anyone else faces thesame challenge, the Form Builder process
is different from the runtime process hence a new authentication always takes place.
Now my tnsnames.ora file looks like this,
# tnsnames.ora Network Configuration File: C:\DevSuiteHome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ajayia-PC)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ajayia-PC)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PLSExtProc)
)
)
Thanks everybody. Cookiemonster thanks a lot for the advice and the pointers. Really appreciate.
Cheers
Aj
|
|
|
|