> statBizObj = PublicStatBizobj(oConn)
> distBizObj = PublicDistBizobj(oConn)
> 
> distBizObj.LinkField = 'statid'
> statBizObj.addChild(distBizObj)

Ed says==>>
    You are adding the distBizObj as a child of the statBizObj, but the 
statBizObj doesn't have the UserSQL that would support a dependent child 
relationship. The parameter error you are getting is because the framework is 
adding the parent's bizobj's key to the query params, but your SQL doesn't 
allow for params.
---------------------------------------------------------------------------------------------------
My reply==>>
Your tip of 'query parameters' was helpful.
Now I ran this query for parent ==>>  'select statid,statnm from stat join dist 
using(statid) where dist.statid=%s'
for child==>> 'select distid,distnm,statid,statnm from dist join stat 
using(statid) where statid=%s'
It worked.
(I was not aware of the fact that 'in UserSQL also, dabo is adding formatting, 
which is of course, on purpose')
---------------------------------------------------------------------------------------------------
Ed says==>>
I'm not sure why you want to go with UserSQL instead of the SQLBuilder methods, 
but keep in mind that once you decide to use UserSQL, you are responsible for 
making sure that the SQL code is correct.
---------------------------------------------------------------------------------------------------
My reply==>>
For simple queries like this, I will happily use SQLBuilder methods of dabo.
When it comes to complex queries, I feel more comfortable with UserSQL, since I 
have optimized queries.
---------------------------------------------------------------------------------------------------
Jacek Kałucki says==>>
First, your DataSource is "dist" table and you perform query
from the "stat" table as source?
It won't work.
 
Thomas says==>> 
Body>select distid,distnm,statidfrom dist where dist.statid=1
There is nor Chr(32) in front of the from.
Copy/Typing error ?

---------------------------------------------------------------------------------------------------
My reply==>>
Sorry for my typos in the email.
In the actual code, it is correct as you both have pointed out.
I will be more careful while posting emails.
------------------------------------------------------------------------

Thanks,
Vineet

--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://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