Home » Developer & Programmer » Forms » Unable to access table from forms which is accessble using sql*plus.
Unable to access table from forms which is accessble using sql*plus. [message #381938] Tue, 20 January 2009 06:32 Go to next message
ommin
Messages: 22
Registered: June 2006
Location: pune,India
Junior Member

Hi Champs,

i have one form in which there is one select statement as below:

"Select (sofar / totalwork) * 100
Into v_percent
From v$session_longops
Where opname = 'PROGRESS_BAR' and sofar < totalwork;"

When i try to compile the form it gives an error stating "identifier v$session_longops must be declared."
But, when i run the same sql statement on the database(using TOAD or sql*plus) it doesn't give me any error.

I didn't understand when any table is accessable directly from the database then why it's giving when i try to access it from the Oracle Forms.

Please give me guideline.

Thanks,
Onkar.
Re: Unable to access table from forms which is accessble using sql*plus. [message #381941 is a reply to message #381938] Tue, 20 January 2009 06:49 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I guess you used the same credentials (username, password, database alias) when connecting to SQL*Plus as well as to Oracle Forms, didn't you?

How did that user acquire privileges in order to successfully select data from this view? Was it a direct grant (direct to that user), or did you first grant the privilege to a role, and then granted this role to a user?

If the latter is your case, you'll need to directly grant privileges to a user (not via a role) because - privileges acquired via roles do not work in PL/SQL (Forms' triggers, procedures etc. are PL/SQL, right?).

If, on the other hand, that's not your problem, I'm afraid I don't have any other idea at the moment.
Re: Unable to access table from forms which is accessble using sql*plus. [message #382285 is a reply to message #381938] Wed, 21 January 2009 14:35 Go to previous messageGo to next message
Kevin58
Messages: 79
Registered: January 2009
Member
One thing that I have observed is that if you are connecting to the database with an ID that has less privledges than the schema owner is that one must fully qualify the datasource table or view on the datablock.

For example the property pallet under the database section
I have given the "Query Data Source Name" the value of
schema.tablename

Otherwise the form will not be able to find the columns it needs for use on the canvas.

Maybe others have a better explanation.
Thanks
Re: Unable to access table from forms which is accessble using sql*plus. [message #382316 is a reply to message #381938] Wed, 21 January 2009 22:59 Go to previous message
parag_narkhede
Messages: 110
Registered: January 2008
Location: Pune
Senior Member
Make sure that you are connected to database from oracle forms. If yes then I think your user may need "SELECT ANY TABLE" privilege.
Previous Topic: INSTALL
Next Topic: A different color each record
Goto Forum:
  


Current Time: Fri Dec 09 19:44:04 CST 2016

Total time taken to generate the page: 0.11700 seconds