Quantcast
Channel: Oracle Bloggers
Viewing all articles
Browse latest Browse all 19780

Bind Variables - types and error scenario

$
0
0

There are two types of Bind Variables in  ADF. Improper use of these bind variables might result in errors which are hard to debug as the error statements are misleading.

Let us look at them in detail.

1.Bind Variable of the type"where"

While declaring Bind Variable, if you specify the bind variable as"required", then its type will be "where".

Entry of the corresponding bind variable in xml file:

2.Bind Variable of kind "view criteria"

If you do not check the "required" check box,then the bind variable will be of type "view criteria"


Error scenario pertaining to Bind Variables:

If you are using a bind variable in the query directly as shown below, then you should use bind variable of typewhere.



Scenario 1: If you are using the bind variable in the query and the bind variable is not "required", then you will get the following error.(This error occurs even if the Bind Variable has a default value)


Scenario 2: If you are using a bind variable in the view criteria and marked it as"required" too, you will get the following error if you are executing the query without applying the view criteria.


If bind variable is marked as required,

and if the bind variable is getting used in the query directly, then there won't be any errors.

and if the bind variable is used in view criteria and the view criteria is applied before the query gets executed, then there will not be any errors.

So, if you are using the bind variable in the view criteria and if you mark it as required, then make sure that you apply the view criteria before the query gets executed.



Viewing all articles
Browse latest Browse all 19780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>