Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Help on button Trigger for Query

Help on button Trigger for Query

From: nick048 <nicosia.gaetano_at_moonsoft.it>
Date: 25 Feb 2007 07:16:19 -0800
Message-ID: <1172416579.217330.20000@h3g2000cwc.googlegroups.com>


Hi,

I have create create with the Developer Suite 10g a Form with 3 Section:
1) The First Section has a Data Block (BLOCK_HEADER) with this entries used as filter in a Query:

  1. TEXT_ANA_TYPE -> text item
  2. TEXT_ANA_CODE -> text item
  3. DOC_TYPE -> text item
  4. ACCOUNT_SITUATION -> radio button
  5. FROM_DATE -> text item (date format)
  6. TO_DATE -> text item (date format) 2) The second Section has a Data Block (BLOCK_BALANCE) based on Table (example MYTABLE) with a grid of data; 3) The third Data Block (BLOCK_CONTROL) has a Query Button.

After entering the data in the BLOCK_HEADER, I need to run a Query with the button, in order to populate my grid with data, wich I apply the filter.
In order to perform this I have created a trigger WHEN-BUTTON-PRESSED with this code:

Declare

LC$Req Varchar2(256) ;
AC$Req Varchar2(256);
TD$Req Varchar2(256);
TI$Req Varchar2(256);
DT$Req Varchar2(256);

Begin

LC$Req := '';
AC$Req := '';
TD$Req := '';
TI$Req := '';
DT$Req := '';

If ((:BLOCK_HEADER.TEXT_ANA_TYPE is not null) AND (:BLOCK_HEADER.TEXT_ANA_CODE is not null)) Then AC$Req := ' D_MYTABLE WHERE ANA_TYPE = :BLOCK_HEADER.TEXT_ANA_TYPE AND ANA_CODE = :BLOCK_HEADER.TEXT_ANA_CODE' ;
-- Set SQL Statement

LC$Req := RTRIM(AC$Req) || RTRIM(TD$Req) || RTRIM(TI$Req) || RTRIM(DT $Req) ;
Go_Block('BLOCK_BALANCE');
Set_Block_Property( 'BLOCK_BALANCE', QUERY_DATA_SOURCE_NAME, LC $Req ) ;
Execute_Query ;
Go_Block('BLOCK_HEADER');
End if;
Go_Block('BLOCK_HEADER');
End ;

I have verified that the SQL string applied with choices is for example

SELECT TYPE_CODE, DOC_CODE, DOC_DATE, ANA_TYPE, ANA_CODE, DOC_TOTAL, DOC_INS, DOC_PAID, DOC_NOPAID FROM MYTABLE WHERE ANA_TYPE = :BLOCK_HEADER.TEXT_ANA_TYPE AND ANA_CODE = :BLOCK_HEADER.TEXT_ANA_CODE AND TYPE_CODE = :BLOCK_HEADER.CODE_TYPE When I run the form and press the Query button, the error: ORA-01008: Not all variables bound

I have searched this error on the Net, but I am not able to correct the problem without help.

I am a newbie in Oracle programming and I hope in Your help.

Thank You and best Regards

Gaetano Received on Sun Feb 25 2007 - 09:16:19 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US