Home » Developer & Programmer » Forms » Database block on remote view on remote database (Forms 32 Bit Version 6.0.8.11.3 (Production))
Database block on remote view on remote database [message #421674] Wed, 09 September 2009 13:18 Go to next message
bibsdash
Messages: 47
Registered: April 2008
Member
HI
The form is working and the main block is based on a view.
Now we have to change main block to a new view with same fields instead of the current view which is the base of the block.

I changed it and the block is not populating data for all the fields.I checked some fields donot have any values.

Any idea what may be the issue?

Thanks in advance.


[MERGED by LF]

[Updated on: Mon, 14 September 2009 01:41] by Moderator

Report message to a moderator

Re: Changing the base view of the database block [message #421723 is a reply to message #421674] Thu, 10 September 2009 02:11 Go to previous messageGo to next message
Littlefoot
Messages: 20825
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
the block is not populating data for all the fields. I checked some fields donot have any values.
Are these fields database fields? If so, they are supposed to contain values only if underlying database object (a "new" view in your case) contains values in these columns. If not, check whether they are populated via (for example) POST-QUERY trigger(s) - perhaps you'll have to modify data source mentioned in the FROM clause(s).
Re: Changing the base view of the database block [message #421818 is a reply to message #421723] Thu, 10 September 2009 16:55 Go to previous messageGo to next message
bibsdash
Messages: 47
Registered: April 2008
Member
Actually the new view exist in another database.
I have created a synonym like the following for the new view which exist in another database:
create public synonym emp_v for scott.emp@db_link;


I am not sure if the block is based on a view over the db link will it be a problem considering the version of the forms.
But I can query the view from the sqlplus or Toad on the same Oracle home.

Any suggestions?
Re: Changing the base view of the database block [message #421839 is a reply to message #421818] Fri, 11 September 2009 00:14 Go to previous messageGo to next message
Littlefoot
Messages: 20825
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you try with a private synonym (i.e. created in the same schema you are connecting to while using this form)?
Re: Changing the base view of the database block [message #421840 is a reply to message #421839] Fri, 11 September 2009 00:18 Go to previous messageGo to next message
bibsdash
Messages: 47
Registered: April 2008
Member
Yes.
I created the synonym and am referring that in the form.

Any idea whether the remote view is supported in Forms 6i version.
Re: Changing the base view of the database block [message #421842 is a reply to message #421840] Fri, 11 September 2009 00:38 Go to previous messageGo to next message
Littlefoot
Messages: 20825
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I wouldn't know, sorry.
Database block on remote view on remote database [message #422035 is a reply to message #421674] Sun, 13 September 2009 23:36 Go to previous messageGo to next message
bibsdash
Messages: 47
Registered: April 2008
Member
This is the Forms version Forms 32 Bit Version 6.0.8.11.3 (Production) on Windows.

I have a database block in a form pointing to a view called 'emp_v' in the local database.We have to change the block to point to a new view 'emp_view' from a remote database having the same database structure.When I changed the view to a new view in a remote database on the block through Layout wizard, it is not working.For the remote view, I created a synonym
create synonym emp_view for scott.emp@db_link)

I could query the view from the SQL Plus or TOAD.

Next, I tried creating another view locally based on the remote database view.Still it didnot work.

As the above action plan didnot succeed, then I tried calling
set_block_property('EMP_BLOCK', DML_DATA_TARGET_NAME , 'emp_view')
in PRE-QUERY trigger to override the block which has database block set to old view 'emp_v'. It also didnot work, then I tried calling the above set_block_property in NEW-BLOCK-INSTANCE trigger.Still the form is loading data from the old view 'emp_v' instead of looking at remote view 'emp_view'.

Did I miss something here?
Please suggest.

[Updated on: Sun, 13 September 2009 23:40]

Report message to a moderator

Re: Database block on remote view on remote database [message #422043 is a reply to message #422035] Mon, 14 September 2009 01:43 Go to previous messageGo to next message
Littlefoot
Messages: 20825
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to drop (or rename) "emp_v" view and see what happens - form should raise an error as it will be unable to fetch data from a non-existent view. Once you fix the error (hopefully), you can restore the "emp_v" view.
Re: Database block on remote view on remote database [message #422050 is a reply to message #421674] Mon, 14 September 2009 02:04 Go to previous messageGo to next message
bibsdash
Messages: 47
Registered: April 2008
Member
Thanks for the reply.
But my target view is 'emp_view' which is the new view from remote database not 'emp_v' which is old view.
Re: Database block on remote view on remote database [message #422053 is a reply to message #422050] Mon, 14 September 2009 02:12 Go to previous message
Littlefoot
Messages: 20825
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That's what I understood. However, *perhaps* there's - somewhere - some kind of relationship which you didn't discover (yet) that uses "emp_v" instead of "emp_view". Therefore, remove "emp_v" and form should fail. It might tell you where to look at in order to fix the issue.
Previous Topic: system generated number
Next Topic: Forms ciritical
Goto Forum:
  


Current Time: Tue Sep 27 02:31:45 CDT 2016

Total time taken to generate the page: 0.11988 seconds