• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2789
  • Last Modified:

Oracle Form-query from clause with parameter

Dear Expert,

iam working in oracle 10g forms,

I have 2 forms

1.calling form

2.called form

from calling form iam passing a parameter to called form

the parameter is co_id

from the called form iam catching the parameter :parameter.co_id.

And in the called form i have a block with from clause query.

Like select a.customer....

from table a,table b
...where a.co_id = :parameter.co_id

when i run the form

ORA-01008: not all variables bound

Please help me.
0
daprjo
Asked:
daprjo
  • 2
2 Solutions
 
k_murli_krishnaCommented:
ORA-01008: not all variables bound
Cause: A SQL statement containing substitution variables was executed without all variables bound. All substitution variables must have a substituted value before the SQL statement is executed.
Action: In OCI, use an OBIND or OBINDN call to substitute the required values.

Also Refer:

PL/SQL ORA-01008 : Not all variables bound
http://www.dba-oracle.com/t_ora_01008_plsql_variables_bound.htm
http://dbmotive.com/oracle_error_codes.php?type=ORA&errcode=01008
0
 
flow01Commented:
did you define the parameter co_id in the called form ?
check if  :parameter.co_id  is really available in the form by
referring to it the when_new_form_instance trigger

begin
message('co_id:'  || :parameter.co_id);  

and compile the program-unit
0
 
daprjoAuthor Commented:
Yes i did still error is coming.Please help me.

THANKS&REGARDS
0
 
flow01Commented:
1) Did you get the error when compiling the change I mentioned
or
2  could you compile the when_new_form_instance trigger and did you get the error executing the form

ad 1) add co_id as a parameter to the called form
ad 2) i can't test for myself know if refering to :parameter.co_id in the where is not possible (i think it possible)
   but you can check it your self because referring to a control-item is possible:
   1. add  an item p_co_id to a control block
   2. in the when_new_form_instance copy the value
        for example :ctrl2.p_co_id := :parameter.co_id;
   3. change the reference in the where to :ctrl2.p_co_id
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now