Originally posted by carloa
You will want to create a data block where the source is a stored procedure instead of the default (table). You can always use the Data Block Wizard to help you in creating your block.
Got that part; now does anyone have an example of what the pl/sql looks like? The following below gives pls-00049.
CREATE OR REPLACE PROCEDURE gtest3
open :query_output for
select line from dookie;
All I want is to get the value of dookie.line displayed on the form.
Originally posted by bhambud
i'm just learning forms, so be gentle.
What I'm trying to accomplish is creating a canvas whose text items get values froms a stored pl/sql procedure.
Can anyone point me to some sample code that shows how to do this?
thanks in advance.
I would suggest you are going to use blocks based on a pl/sql table. ( but this will require forms 6i or above )
1 Step. create a pl/sql procedure in your database taking an pl/sql table as in/out parameter. (eg. 'type mytable is table of YOUR_DATA_TYPE index by binary_integer ' )
2. In Forms using the block-wizard select 'block based on an stored procedure'. You will be asked for the name of the procedure. After you have declared your procedure
the block wizard examines ist and let you choose which data you want to display.
3. You can define a procedure for SELECT, INSER, UPDATE, DELETE if you want.
4. You will get an new block with a query-procedure trigger ( do not edit this trigger manually, forms will take care of that )
5. populate your pl/sql table in your procedure and you will automatically see the data in your forms application.
6. if you need input params for your query, you can define
multiple 'in' parameters in your pl/sql procedure.
to bind them to an text-field of an block use the 'query data source arguments' parameter in the property palette of this block. ( eg. ':block1.textitem1' )