Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    7

    Unanswered: QUERY-PROCEDURE, Forms

    Hi everyone,
    please explain me how to solve this problem.
    I have created a block based on the subsequent procedure:



    ************************************************** *****
    PACKAGE Definizioni_di_tipo AS
    type search_type is table of testo%rowtype index by binary_integer;
    PROCEDURE Ricerca (search_table in out search_type);
    END Definizioni_di_tipo;
    ************************************************** *****
    PACKAGE BODY Definizioni_di_tipo AS
    PROCEDURE Ricerca (search_table in out search_type) IS
    cursor tabella is
    select *
    from testo
    where (length(:search_isbn)=0 or ((testo.isbn=:search_isbn) and (length(:search_isbn)<>0)) and
    length(:search_titolo)=0 or ((testo.titolo=:search_titolo) and (length(:search_titolo)<>0)) and
    length(:search_autore)=0 or ((testo.isbn=:search_autore) and (length(:search_autore)<>0)) and
    length(:search_editore)=0 or ((testo.isbn=:search_editore) and (length(:search_editore)<>0)));
    contatore number default 0;

    BEGIN
    for tabella_rec in tabella
    loop
    search_table(contatore):=tabella_rec;
    contatore:=contatore+1;
    end loop;
    END Ricerca;
    END Definizioni_di_tipo;
    ************************************************** *******


    The problem is that the QUERY-PROCEDURE is created in this way:




    ************************************************** ********
    -- Automatically generated trigger for procedure data source.
    -- Do not edit.
    -- If this trigger fails to compile, verify the block procedure data source is correct.
    DECLARE
    bk_data DEFINIZIONI_DI_TIPO.DEFINIZIONI_DI_TIPO.SEARCH_TYP E;
    BEGIN
    Definizioni_di_tipo.Ricerca(bk_data);
    PLSQL_TABLE.POPULATE_BLOCK(bk_data, 'SEARCH_RESULT_BLOCK');
    END;
    ************************************************** *********





    where DEFINIZIONE_DI_TIPO is duplicated!!
    When I compile the form this message is displayed:
    "the component DEFINIZIONE_DI_TIPO must be defined" (or something similar... I have italian version).
    If I substitute
    DEFINIZIONI_DI_TIPO.DEFINIZIONI_DI_TIPO.SEARCH_TYP E
    with
    DEFINIZIONI_DI_TIPO.SEARCH_TYPE
    errors go away but when I compile again the form, the QUERY-PROCEDURE comes back as it was originally.

    So... How can I solve this problem?!?
    Thank you in advance.
    Salvo

  2. #2
    Join Date
    Nov 2003
    Posts
    7

    Re: QUERY-PROCEDURE, Forms

    I have solved this problem by deleting and writing again the package.
    Now... when I run the form. the query-procedure is not executed.
    Can you help me please?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •