Home » Developer & Programmer » Forms » Want to display record on non database item (10g, windows 7)
Want to display record on non database item [message #566545] Mon, 17 September 2012 07:08 Go to next message
glmjoy
Messages: 187
Registered: September 2011
Location: KR
Senior Member
I want to display my query select * from Clinical_Chart_CCHPI in non database item which is 1000 Char. I want to display that query when my forms execute.

below is the test case.

Create table Clinical_Chart (Chart_Number Char(12),MR_NO Char(13));
Create table Clinical_Chart_CCHPI (Chart_Number Char(12),serial_number number,Date Date, Remarks Varchar(1000));

--------------------------
insert into Clinical_Chart(1,1);
insert into Clinical_Chart_CCHPI (1,1,01-JAN-2012,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaaaaaaaaaaaaa');
insert into Clinical_Chart_CCHPI (1,2,02-JAN-2012,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbbbbbbbbbbbbbbbbbbb');
insert into Clinical_Chart_CCHPI (1,2,03-JAN-2012,'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCcccccccc');

commit;

I have use my query in When_New_Form_Instance
my query is below
Declare
Lv_Sql Varchar2(5000);
Begin
lv_sql := 'Select* From CLINICAL_CHART_CCHPI';

SET_BLOCK_PROPERTY('BLOCK6',QUERY_DATA_SOURCE_name, lv_sql);
GO_BLOCK('CLINICAL_CHART');
clear_block;
execute_query;
End;

I have taken one non database block and my item Test which is non-database too. But no result is coming i have attached JPEG file too.

Thanking in Advance

GLMJOY
  • Attachment: test.JPG
    (Size: 44.98KB, Downloaded 682 times)
Re: Want to display record on non database item [message #566547 is a reply to message #566545] Mon, 17 September 2012 07:43 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is there any reason for NOT using data blocks and built-in Forms processing?

Why control blocks? What advantage do you expect?
Re: Want to display record on non database item [message #566549 is a reply to message #566547] Mon, 17 September 2012 08:03 Go to previous messageGo to next message
glmjoy
Messages: 187
Registered: September 2011
Location: KR
Senior Member
No there is no such reasoon to put out of data block just for putting it seprate in block so on execute query i can get result.
Re: Want to display record on non database item [message #566563 is a reply to message #566549] Mon, 17 September 2012 09:36 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Execute query works on data blocks, not on control blocks.

Therefore, use a data block wizard in order to create master-detail relationship. Forms will do the rest.
Re: Want to display record on non database item [message #566665 is a reply to message #566563] Tue, 18 September 2012 07:51 Go to previous message
glmjoy
Messages: 187
Registered: September 2011
Location: KR
Senior Member
Thanks for the tip.
Previous Topic: Capture image throug webcam
Next Topic: ORA-12203
Goto Forum:
  


Current Time: Wed Jul 03 10:17:25 CDT 2024