Home » Developer & Programmer » Forms » How to populate a form blcok through cursor
How to populate a form blcok through cursor [message #142244] Thu, 13 October 2005 23:04 Go to next message
d.dineshkumar
Messages: 211
Registered: April 2005
Location: Kolkatta
Senior Member
Hi all,
how can i populate a form multi record block from a cursor.

For example , suppose i have a cursor fetching all the records from emp for deptno 10 , and i have a multirecord block for emp.
Now how can i populate record in my block on the click of a button.


Hope i am clear.
Thanks And Regds
Dinesh
Re: How to populate a form blcok through cursor [message #142250 is a reply to message #142244] Thu, 13 October 2005 23:23 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Look at http://www.orafaq.com/forum/m/605/67467/?srch=populate+block+cursor+create_record#msg_605 and for my feelings about writing code like this read http://www.orafaq.com/forum/m/134237/67467/?srch=populate+block+cursor+create_record#msg_134237.

David
Re: How to populate a form blcok through cursor [message #142320 is a reply to message #142250] Fri, 14 October 2005 02:31 Go to previous messageGo to next message
d.dineshkumar
Messages: 211
Registered: April 2005
Location: Kolkatta
Senior Member
Thanks

Regds
Dinesh
Re: How to populate a form blcok through cursor [message #142549 is a reply to message #142320] Sat, 15 October 2005 10:26 Go to previous messageGo to next message
d.dineshkumar
Messages: 211
Registered: April 2005
Location: Kolkatta
Senior Member
Hi all,
What is the error in the following code:

If(:DUMMY_BLOCK.D_SYSTEM_NAME='HR' Then
GO_BLOCK('BLOCK01');
set_block_property('BLOCK01',QUERY_DATA_SOURCE_NAME,'SELECT * FROM MST_HR@HR'); V_QRY_DATA_SRC_NM:=GET_BLOCK_PROPERTY('BLOCK01',QUERY_DATA_SOURCE_NAME);
MESSAGE(V_QRY_DATA_SRC_NM);
set_block_property('block01',default_where,'system_name = '''||:d_system_name ||''''||
' and condition = ''' || :d_condition ||'''');
clear_block(no_validate);
do_key('execute_query');
Else
....
End If;
here my requirement is on the basis of d_system_name.
How can i change my data source to mst_hr@hr at runtime.

Hr is a dblink.
The above statemet is returning Ora-40405 -unable to perform query.

How to solve this.
Thanks And Regards
Dinesh

[Updated on: Sat, 15 October 2005 10:27]

Report message to a moderator

Re: How to populate a form blcok through cursor [message #142609 is a reply to message #142549] Sun, 16 October 2005 18:42 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If you had fed your code through a formatter it would have shown you the surplus opening bracket after the 'IF' clause. Drop that bracket and try again.

David

[Updated on: Sun, 16 October 2005 18:46]

Report message to a moderator

Re: How to populate a form blcok through cursor [message #326819 is a reply to message #142549] Thu, 12 June 2008 13:20 Go to previous message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

d.dineshkumar wrote on Sat, 15 October 2005 17:26
Ora-40405

Did you mean FRM-40405 ?
Previous Topic: running reports thru forms dynamically
Next Topic: Trying to navigate using first_record, next_record
Goto Forum:
  


Current Time: Wed Apr 24 01:43:24 CDT 2024