But the .bind method is supposed to bind a value to the placeholder, despite the times the placeholder ($) is used in the query.
At least, the way I see it... Does anybody knows if its a normal behaviour like Robert suggested ? > I'm new to OJB, but that doesn't surprise me since in standard SQL java > stuff, you have to do something like: > > pstmt.setString(colidx++ , availablity); > pstmt.setString(colidx++ , availablity); > > In order to bind every column even if the value is the same. Seems to > me like it's normal behavior, but like I said, I'm new to OJB and am > not 100% sure of it. > > R > > On Monday, January 27, 2003, at 04:46 PM, Goncalo Luiz wrote: > > > Hi. > > > > I've been using OJB for a while and I got to the following error: > > > > if you have an OQL query like: > > > > query = "select form article where id=$1 and color=$2 and avaliable = > > $3 and > > otherProperty =$3" > > and then you bind your variables like: > > query.bind (id); > > query.bind (color); > > query.bind (avaliability); > > > > you get a runtime error. > > > > I was expecting that the Java variable "avaliability" was binded to $3 > > and > > used on both conditions. > > > > The solution is : bind the variable "avaliability" twice. > > > > Is this a known issue ? > > > > Regards, > > Goncalo Luiz. IST. Portugal. > > > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>