Block Property (Query Data Source Type)

Hello Friends
I am using Forms 6i.oracle 9i.
in the Block Property Pallete under Query Data Source Type there
are 4 Type is mentioned.i have used Table,From Clause Query but yet to use Transactional Trigger and Procedure.How to use this two and it will be very kind enough if u give any example about these twos.
Regards

There's a whole bunch of explanation about this subject in the online help of Forms. Just select the Query Data Source Type property and press F1. The initial explanation is very limited but there are a number of useful links under "Related topics"

Similar Messages

  • Query for records on a block with Query Data Source Type : Procedure

    Hi All,
    The veriosn of form I'm using is:
    Forms [32 Bit] Version 6.0.8.23.2
    I have a block based on a procedure.
    But when I enetr-query and search for records specific to ceratin criteria even then the result of the Query is all records.
    Is Query not allowed on a block with Query Data Source Type : Procedure.
    Hope my question is clear.
    Thanks in advance.
    Regards
    Arif

    When you use a table based block, forms can construct any select with any where clause based on the given inputs. Using a procedure based block, forms cannot "know" which in or out parameter of the procedure corresponds to which item. Even if Forms could pass the value of an item to an argument automagically, the procedure would have to "do something" with the argument, and you´d have to code it.
    So, any item that should be used in the where-clause must be mapped to an argument.
    Perhaps it would be easier to use a table based block querying a view? For DDL, you could use an instead-of-trigger on the view.
    Regards,
    Gerd

  • Abnormal termination of runform when PROCEDURE is used as Query Data Source Type

    I created a package with a procedure that returns a table of records. This
    procedure tested OK in SQLPLUS. I then created a form and in this form a block
    that used this procedure as the Query Data Source Name, and of course the Query
    Data Source Type has been set to PROCEDURE. This form runs beautifully when the
    number of records returned is small (a few hundreds). But when the number of
    records is large (I have one case where the total number of records returned
    was 11099) then it will crash. I also found that whenever this happens, there
    will be a file in my C:\TEMP with funny namessuch as s90, s81, etc. They are
    always the same size (5008 kBytes).
    Anyone any ideas?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Chandra movva([email protected]):
    Create a view and base your block on view.That could solve the problem unless you have other requirements specifically.<HR></BLOCKQUOTE>
    Chandra,
    Thank you for your suggestion. Unfortunatel, we have requirements that translate to logics too complicated to be handled by views, and that is why we use PROCEDURES. This actually works very well and very fast, except when we have lots of records returned, then it fails. I am just wondering whether this is a configuration problem ???
    Regards,
    A. Leung
    null

  • Query Data Source Type

    hi,
    I can't create...
    Query Data Source Type:  FROM clause query
    Query Data Source NAme:  (select t.col1 as cl1,t.clo2 as cl2, m.col1 as cl3
                                              from tab1 t, tab2 m)
    WHERE clause:  cl1=:master.col1 and cl3=:master.col3
    is not work....
    form's  6i
    thank's
    Jomar

    You can not use where condition if query data source type is
    From Clause Query.
    Use DB view and filter data by Where clause in the block.
    D

  • Using query data source type as procedure

    Could anyone pls. let me know how to use the query data source type property as procedure? Is there any example or document where I can find the above info? Any help or reference to doc will be helpful...
    Thanks in advance

    Have a look at Note 66887.1 on MetaLink.

  • Query data source type = procedure or from clause

    1)I have a form where a block is based on a from clause. In the source name I entered a simple sql statement.
    Isn't the items suppose to show without any other action or
    WHAT ELSE DO I NEED TO DO IN ORDER TO SEE THE BLOCK ITEMS EQUIVALENT TO THE COLUMNS IN THE QUERY?
    2) I have a form where a block is based on a procedure.
    First I created a package in a program unit with the procedures query_procedure, insert_procedure, update_procedure, delete_procedure and lock_procedure.
    Then I set the query data source name to the package query_procedure. The columns and arguments were automatically filled by Forms - they are fine as well.
    Forms automatically created the block triggers insert-procedure,delete-procedure, update-procedure and lock-procedure.
    Everything seems to be fine but when I run the form and execute the query I get frm 40505 - unable to perform query.
    What am i doing wrong?
    This is the package:
    PACKAGE pkgdeptemp IS
    type dept_emp is record (
    empno number(4),
    ename varchar2(10),
    job varchar2(9),
    hiredate date,
    sal number(7,2),
    deptno number(2),
    dname varchar2(14));
    success constant number :=0;
    type dept_emp_ref is ref cursor return dept_emp;
    type dept_emp_tab is table of dept_emp index by binary_integer;
    procedure query_procedure (resultset in out dept_emp_ref, p_empno in number);
    procedure lock_procedure (dmlset in out dept_emp_tab);
    procedure insert_procedure (dmlset in out dept_emp_tab);
    procedure update_procedure (dmlset in out dept_emp_tab);
    procedure delete_procedure (dmlset in out dept_emp_tab);
    END;
    PACKAGE BODY pkgdeptemp IS
    function get_success return number is
         begin
              return(success);
         end;
    procedure query_procedure (resultset in out dept_emp_ref, p_empno in number) is
    begin
         open resultset for
              select e.empno, e.ename, e.job, e.hiredate, e.sal, e.deptno, d.dname
              from emp e, dept d
              where e.deptno = d.deptno
              and e.empno = nvl(p_empno, e.empno);
    end query_procedure;
    procedure lock_procedure(dmlset in out dept_emp_tab) is
         tempout number(4);
    begin
         for i in 1..dmlset.count loop
              select empno
              into tempout
              from emp
              where empno = dmlset(i).empno
              for update;
         end loop;
    end lock_procedure;
    procedure insert_procedure (dmlset in out dept_emp_tab) is
         cursor c_dept (i binary_integer) is
         select deptno
         from dept
         where deptno = dmlset(i).deptno;
         tempout number(4);
    begin
         for i in 1..dmlset.count loop
              open c_dept(i);
              fetch c_dept into tempout;
              if c_dept%notfound then
                   insert into dept(deptno,dname)
                   values(dmlset(i).deptno, dmlset(i).dname);
              end if;
              close c_dept;
              insert into emp (empno,ename,job,hiredate,sal,deptno)
              values (dmlset(i).empno, dmlset(i).ename, dmlset(i).job, dmlset(i).hiredate, dmlset(i).sal, dmlset(i).deptno);
         end loop;
    end insert_procedure;
    procedure update_procedure (dmlset in out dept_emp_tab) is
         cursor c_dept (i binary_integer) is
         select deptno
         from dept
         where deptno = dmlset(i).deptno;
         tempout number(4);
    begin
         for i in 1..dmlset.count loop
              open c_dept(i);
              fetch c_dept into tempout;
              if c_dept%notfound then
                   insert into dept(deptno,dname)
                   values(dmlset(i).deptno, dmlset(i).dname);
              else
              update dept
              set deptno=dmlset(i).deptno,
              dname=dmlset(i).dname;
              end if;
              close c_dept;
         update emp
              set empno=dmlset(i).empno,
              ename=dmlset(i).ename,
              job=dmlset(i).job,
              hiredate=dmlset(i).hiredate,
              sal=dmlset(i).sal,
              deptno=dmlset(i).deptno;
         end loop;
    end update_procedure;
    procedure delete_procedure (dmlset in out dept_emp_tab) is
    begin
         for i in 1..dmlset.count loop
              delete from emp where empno = dmlset(i).empno;
         end loop;
    end delete_procedure;
    END;

    for ur q1:
    create the text items manually in the layout editor or in the obj navigator then specify there properties manually in the the pallette.
    database item = yes
    column name = field name in ur select statement
    for q2:
    try running the form again and press F8 then if an error occur press F1 or shift F1 to show the error in ur code.
    i suspect u forgot to specify a value for the in parameter the reason why u get an error that is specify the actual parameter for ur in argument then press F8.
    enjoy!

  • Block with query data source tipe: from clause query

    I have a block that have this property.
    But now I want to change data.
    Do you know how to do it?

    A from clause query does what is says: it can only query data. For DML operations use Table/Procedure.
    hth,
    J

  • FROM Clause query data source type

    i do i get the result set of a FROM Clause datasource into an item.

    A FROM clause may be used as the datasource for a data block. A FROM clause is a feature of the Oracle8 Server that allows you to nest a SELECT statement in the FROM clause of a SELECT statement. A FROM clause is a valid query block datasource, but it is not a valid DML block datasource. The value returned from a FROM clause is a subset of records from the original query.
    FROM clauses are used to perform joins, lookups, and calculations without having to create a view on the server. FROM clauses can also be used to prototype views and to increase performance.
    Using a FROM clause as a block datasource is similar to using an updateable join-view as a block datasource. However, a FROM clause provides more control, because the presence of a DBA is not required to define the view. You should note that the FROM clause produces results that are identical to an updateable join-view from the client side, but that there is no defined view on the server.
    My question has not been answere and i hope the above copies explanation from forms6i documentation will help understand the question better.
    Please Advise

  • How to use 'query data source Name '  property in a block

    I want to create a block using query and want to show the columns on a form.
    Could you please tell me how can I do this?
    Regards

    Hi!
    Create a new block manually.
    Set the Query Data Source Type Property to FROM clause query.
    In the Query Data Source Name Property write your query like you would
    write it in sql*plus or toad but without a order by clause.
    Set the DML Data Target Type Property to None.
    Create items for the columns in your query.
    May set the where clause and order by property of the block.
    Build the form and execute a query in your new block.
    Regards

  • About Query Data Source Columns property

    Hello everyone,
    I'm new to Oracle Forms version 10.1.0.2.
    When I create a data block based on a table using Data Block Wizard, the block's Query Data Source Columns property is automatically populated with column definition entries corresponding to the columns of the base table.
    I tried making changes to these entries, for example by changing the data types to wrong data types or even deleting them, and I found that those changes had no effect on the block at all. The form was still working as I wanted.
    Please explain what is exactly the role of the block's Query Data Source Columns property.
    Thank you very much.
    p.s: The F1 key help says "The Query Data Source Columns property is valid only when the Query Data Source Type property is set to Table, Sub-query, or Procedure". So, please explain in each context of Query Data Source Type.

    p.s: The F1 key help says "The Query Data Source Columns property is valid only when the Query Data Source Type property is set to Table, Sub-query, or Procedure". So, please explain in each context of Query Data Source Type.
    IMHO those properties are very self-explaining: It is the data source of the block, or in other terms: how it is populated.
    Table means the data block is based on a table and subsequently will be populated by
    select col1, col2, col3 from your_table
    With sub-query the block will be populated with your subquery; forms will issue
    select col1, col2, col3 from (
      -- this is your subquery
      select col1, col2, col3 from tab1, tab2 where [....]
    With Procedure in short you'd have a stored procedure which returns a ref cursor and the block will be populated by the ref cursor.
    As for your question about the name: this actually should matter; the default is NULL which means that there needs to be a column which has the exact name as the item so in the above sample with table the item associated with your_table.col1 should be named col1. If it isn't the property should be named like the column. If this property also doesn't reflect the name this shouldn't work IMO.
    cheers

  • Frm-41380 error - cannot set the blocks query data source

    Fairly new forms so bare with me. I am creating a form based on one table. This table has one column that is a nested table.
    table name: szrtime
    table columns: szrtime_code, szrtime_styp_list
    szrtime_styp_list is a table of varchar2(1).
    main block is szvtime_block
    the block that contains the nested table is szvtime_styp_block
    I read that I could use a WHEN_NEW_RECORD_INSTANCE trigger on the main block to display the related nested table. I have tried the folllowing:
    Declare
    select_stmt Varchar2(512) ;
    Begin
    If :szvtime_block.szvtime_code Is not null Then
         select_stmt := '(SELECT column_value FROM TABLE ( SELECT szrtime_styp_list FROM szrtime WHERE szrtime_code = ''' || :SZVTIME_BLOCK.SZVTIME_CODE || '''))';
         Go_Block('SZVTIME_STYP_BLOCK' );
         Clear_Block ;
         message('select_stmt = '||select_stmt);
    Set_Block_Property( 'SZVTIME_STYP_BLOCK', QUERY_DATA_SOURCE_NAME, select_stmt ) ;
    Execute_Query ;
    Go_Block('SZVTIME_BLOCK') ;
    Else
    Go_Block('SZVTIME_STYP_BLOCK' );
    Clear_Block ;
    Go_Block('SZVTIME_BLOCK') ;
    End if ;
    End ;
    The result is the frm-41380 error.
    I have tried change the query data source type on the nested table block to Table or From-clause but did not help. The select statement that is valid and returns the correct result in Toad.
    Any suggestions on what to look for? Thank you.
    Todd

    > But what is giving me pause is that the user will be updating, deleting, and inserting
    into this table and, of course, the nested table column.
    It would give me pause, too. I've never used nested tables, so I poked around in Forms on-line help. In Forms 6i, it specifically states that Forms does not support the Nested Table structure.
    In Forms 10g help, it describes Nested Table structures, but says NOTHING about how a form would handle it. And that implies to me that it is still not supported. So good luck.
    In addition to creating the view, you may need to provide your own nested table updating procedures via a package on the server which your form can call. I know Forms supports passing pl/sql tables ("indexed by binary_integer"), so you could pass your nested table back and forth between the package and the form in that format.

  • Setting Query Data Source Arguments Property for Block with TYPE Procedure

    Hi,
    I have a block whose type is 'Procedure', this returns a PL/SQL table.
    I pass an IN OUT variable declared in the Package header and all works well.
    What I need to know is how, if I have ANOTHER argument, how do I set it programatically prior to EXECUTE_QUERY.
    I can see how to set the Name and Value manually at the "Query Data Source Arguments" property but if I need to set it dynamically in the code how would I do it.

    Thanks,
    Worked it out.
    Set the VALUE to the name of a Global variable and populated the variable before executing the procedure.
    Thanks

  • Forms clause query data source data block in oracle forms

    Hello experts,
                  I am new in oracle forms.I am using oracle forms 11g with weblogic 10.3.5 at windows 7.Through googaling I know how to create a database block,forms clause data block and stored procedure based datablock in oracle forms.I want to know that as in case of  Database based datablock, could we commit form either on editing records or on insertion or deletion in data block.
    I tried this but got error frm 40501.If we can perform editing and creation in such type of datablock then please tell me how.
    Thank You,
    regards
    aaditya

    When I base my datablock on a query using the "From Clause" property of the block query data source in the oracle Forms 6i,
    I get the strange error
    "ORA-00928: missing SELECT keyword"
    The query I see in the Display Error in Help Menu is
    SELECT DAY_NUMBER,CONSULTANT_ID,EVENT_ID,EVENT_NUMBER,SESSION_NUMBER,HOURS_UNPAID,HOURS_PAID,PAPERWORK FROM (EVENT_ASSIGNED_CONSULTANT) WHERE (CONSULTANT_ID=:1)
    What should I do now?????? Please remove the brackets () from the table name.
    Instead of (EVENT_ASSIGNED_CONSULTANT) use
    EVENT_ASSIGNED_CONSULTANT

  • When changing query data source property.....

    hello folks,
    I have this very weird behavior in oracle forms 10 g R2:
    in my form I built a datablock " DB " based on a table " table1 ", in that datablock I added a push button that changed the query data source name of data block DB to " table2 " using the set_block_property() built-in, please note that table1 and table2 has the same structure.
    When I query the table2, and if i try to update a record, the updates are not saved and I got the error ora - 0000 , It seems that after changing the query data source to table2, if i try to update a record, the locking is perform to table1 (the original query data source that the datablock is built in the first place) ....
    Please can anyone help or explain me this behavior and what can i do to perform a workaround for it,,,,,
    and than you in advance...

    dear Mark,
    What indicates that the record is locked? More information please. well if query the v$lock view or from the EM I can see that the lock is performed on the first table

  • Question on Dynamic Query Data Source and Form Folders in Oracle Forms 6i

    Hi there -
    I have one interesting requirement in Oracle Forms.
    This is what I wanted to do.
    1. Have a LOV and Go button on Form.
    2. From LOV, I will select a pre-defined custom table and click Go.
    3. Based on the selected custom table, I have to populate the Block (Tabular Format).
    4. User should be able to do update, delete, insert on this block.
    5. User should be able to use the Oracle Form folders functionality (select only necessary column and save views etc. Std folder functionality).
    6. If user selects a different custom table name in the LOV on top, I need to refresh the data from the block based on this new table. Remaining functionality should be as it is (steps 3 to 5).
    You can see here, I am going to have dynamic query data source (Table Name as well as column mapping) on the block. I do not know before hand how many columns the user selected table has!
    This is what I have planned for this so far but I have some major questions before I can move on with this design:
    1. I am going to create a table structure with fixed number of column in form (40 cols assuming that the custom table will not have more that 40 cols). (Kind of limitation but it's okay as of now).
    2. Dynamically populate the block based on the table name selected by the user from LOV. Dynamically change the table column names based on the table selected etc.
    3. Perform insert, update, delete using PL/SQL package.
    So far it looks okay.
    Now my real question is,
    Can user still be able to user "Folders" functionality here? I have never done this kind of development before and I doubt the dynamic column naming, dynamic column data source will really work for "folders"!
    Also, I am not really sure whether user will be able to save these "folder" queries?
    Okay so form experts, can you ppl suggest me if this is really going to work? Are there any better ways to do this?
    Initially I tried to do this in OA Framework but I got stuck at because as per OAF developer guide "I cannot user OAF personalization for dynamic items, regions etc".
    For more info on that thread see this link...
    Re: setUserCustomizable issue!
    Thanks in advance for the help.

    Any suggestion anyone?

Maybe you are looking for

  • How many times a program has been run?

    Is there a transaction or table or something that tracks how many times a program has been run?   The number of times the program has been run plus using the programs' attributes for last changed would help me a lot.  We need this for an archiving st

  • How to configure Additional acquisitions and divestures

    Hi Team, I am using YTD consolidation application. I wanted to know how to proceed to account Additional percentage of acquisitions and divestures while handling goodwill. Thanks and regards Naveen Vaddi

  • Apache+tomcat+env vars ..?

    I know this should proabably be posted in a tomcat-related forum, but it's worth a shot. I'm using apache 2.0.43, and tomcat 4.1.12, linked togeather with mod_jk on a linux-machine (redhat 8.0), and everything works just fine .. except for one thing.

  • FM HR_INFOTYPE_LOG_GET_DETAIL

    Hi Expert, I would like to use this FM to get the infotype value change befoer and after. But I am not sure what value should use as the importing parameter. For example, I would like to get the change detail of infotype 0008 on 09.02.2010 Relid_pcl4

  • How to change language in Premiere?

    Good afternoon! I established CC in Russian. But me more habitual to work at English. How to change language in Premiere? Dmitriy Pavlov