Update on this -- There was a spelling mistake in the field name,  which 
accounts for the error. 
 
But even without an error, we are unable to get replace to replace  
anything. 
 
Out of curiosity, we tried using the biz object execute method to issue an  
update command, and this worked: 
 
 dlg = dabo.ui.createForm("Invalidate.cdxml", show=True,  parent=self)
if dlg.Accepted:
bizRuns =  self.Form.getBizobj("runs")
ThisRun =  bizRuns.getFieldVal('run_no')
bizTubes =  self.Form.getBizobj("tubes")
bizTubes.execute("update tubes set  result = 'Invalid' where RUNfk = %s" %  
ThisRun)
bizTubes.saveAll()
dlg.close()
self.Form.requery()

All the results in the child grid change to 'Invalid'. A query in a MySQL  
window verify that the change has been made to the database. Any reason not 
to  use execute to make these sorts of changes?
 
But replace method changes neither the values in the result column, nor in  
the database.
 
  bizRuns = self.Form.getBizobj("runs")
ThisRun =  bizRuns.getFieldVal('run_no')
bizTubes =  self.Form.getBizobj("tubes")
bizTubes.replace("tubes.result","Invalid",  scope="RUNfk==%s" % ThisRun)
bizTubes.saveAll()


In addition, after running this code, the bizobj seems to be messed  up. If 
I move in the parent grid off the row that had the change (ThisRun), and  
then move back, an information "Notice" pops up, saying "cursor closed" and  
displaying the sequel that failed to run. After the popup closes, the child 
grid  continues to display the records for the previous parent record.
 
I must be doing multiple things wrong.
 
 
 




--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/c0e.5b29f3d4.37e91...@aol.com

Reply via email to