Home » Developer & Programmer » Forms » Database block on a view
Database block on a view [message #168969] Mon, 24 April 2006 07:52 Go to next message
kritikverma
Messages: 22
Registered: January 2006
Location: Jamshedpur, India
Junior Member
Hi All,
I have created a database block on a view and this is populated
using SET_BLOCK_PROPERTY command. It is working as required. Now a backend procedure is called in when-button-pressed trigger which updates certain records in the table. These records needs to reflected on the screen (in the database block created on view) without using the EXECUTE_QUERY command.

I have two options:
1) Simply update the value on the block but this is not happening as the block is created on a view.
2) The second option is to refresh only the record on the block. I don't want to use EXECUTE_QUERY as this would unnecessary query all the records.

Please suggest an alternative to query on the changed record. SELECT statements are not working as this block is based on view.

Regards,
Kriti
Re: Database block on a view [message #169042 is a reply to message #168969] Mon, 24 April 2006 15:34 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Could you restrict data set to be fetched using SET_BLOCK_PROPERTY and setting its DEFAULT_WHERE clause? Doing so, EXECUTE_QUERY would perhaps run easier.
Re: Database block on a view [message #169740 is a reply to message #169042] Fri, 28 April 2006 08:52 Go to previous messageGo to next message
kritikverma
Messages: 22
Registered: January 2006
Location: Jamshedpur, India
Junior Member
Hi,
Your suggestion was perfect, but the problem is that I want to execute only the specific record at a specific position. The rest data should be exactly the same. I can restrict the data to query only the changed record but this query should be done at a specific record number. How would I do this ? Please suggest...

Regards,
Kriti
Re: Database block on a view [message #169775 is a reply to message #169740] Fri, 28 April 2006 12:05 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm quite sure that this can not be done using basic Forms functionality ... EXECUTE_QUERY, if ran on the block, retrieves all records that match criteria. I don't know how to "refresh" only the changed record while all the others remain as they were.

I don't speak Java, but - listening to the people that do - perhaps answer to your question can be found there?
Re: Database block on a view [message #169946 is a reply to message #169775] Sun, 30 April 2006 23:10 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why do you care how many records are requeried as long as they are?

David
Re: Database block on a view [message #171346 is a reply to message #169946] Tue, 09 May 2006 08:13 Go to previous messageGo to next message
kritikverma
Messages: 22
Registered: January 2006
Location: Jamshedpur, India
Junior Member
It is very important because the data is queried from a remote database and it takes some to get displayed. Hence it is a performance issue if all the records are requeried.

If you have a solution then please do update it.

Bye,
Kriti
Re: Database block on a view [message #171415 is a reply to message #171346] Tue, 09 May 2006 18:22 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
The following link concerns populating a block using a cursor
http://www.orafaq.com/forum/m/605/67467/?srch=populate+block+cursor+create_record#msg_605
and, for the record, my feelings about it.
http://www.orafaq.com/forum/m/134237/67467/?srch=populate+block+cursor+create_record#msg_134237

However, your situation seems to be different. Either use the manual cursor method and then use a single record 'select' statement using the record's key information OR if that proves difficult, create your own screen with individually named fields and populate them using the manual cursor and then maintain them using the single record 'select' statement method.

David

[Updated on: Tue, 09 May 2006 18:22]

Report message to a moderator

Previous Topic: enabling disabling records
Next Topic: ORA-01733 :virtual column not allowed here
Goto Forum:
  


Current Time: Fri Sep 20 06:42:58 CDT 2024