On Apr 6, 2013, at 12:12 AM, Aleq <[email protected]> wrote:

> Magic happend with '?' in addWhere clause. Now here is another problem. As I
> understand, bizobject created 'on the fly' and when I put
>        biz.addWhere("yr = ?")
>       biz.setParams(y)
>       biz.requery()
> in dTextBox object ( onHit Method), and the rest of the code (connection to
> the database, addFields, etc) is in AfterInit Method of dForm object. I'm
> getting bunch of errors, like: 
> "dabo.dException.DBQueryException: Incorrect number of bindings supplied.
> The current statement uses 2, and there are 1 supplied."
> Where can I put my search condition and addWhere clause?
> Thank you very much for your help with familiriazation of Dabo. 

        Sounds like you are calling 'addWhere()' more than once with the same 
clause. IOW, the call to 'addWhere()' changes the SQL that is executed by 
adding another WHERE clause. Usually you only have to do that once, when the 
bizobj is created; after that, the only thing that changes are the parameters 
used in the query; the query itself remains unchanged.


-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to