Bind Variables - types and error scenario

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 type where.



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.


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

ADF Tips and Tricks

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today