This content has been marked as final. Show 7 replies
Yes, we do write that when we are sure about the numbers..but in my case, some times user can put 1 value, so my index will be 2, but the moment user selects a second field, my index will fail.
I have to check wht fields user selects, take d count, and based on that i gotta assign index, that can be 1 way, but wanted to cnfrm, if any other generic method is there to do this..
If you don't wish to use positional parameter, I think you can go with Named Parameters and then use setNamedWhereClauseParam in VO. This way you need not worry about existing position parameter index. I haven't used this, so not sure of any impacts. Refer to the JDev guide to understand the named parameters and possible issues.
Use the following code snippet to add where clause
String s = "xyz="+vXYZ;
Using a variable (vXYZ: value that you want as filter) in string definition would save you to have a named bind parameter and still be able to add the additional bind parameter. This should work.