Hi,
I was doing a little work today and discovered a bug (??) with moveToPK() - It
appears that it does not completely retrieve all the data???? The table in
question is a child and I'm trying to move to a record when the users select a
different PK and refresh the screen with the new child data. I can't explain
this!
openSUSE 12.1, python 2.7, wxpython 2.8.11, latest Dabo.
def updateVoyageScreen(self, KeyValue):
loc_cur = self.pwvoyage.getTempCursor()
loc_cur.execute('select * from warehouse.pwvoyage where pkid = %s' %
(KeyValue))
myds = loc_cur.getDataSet()
print myds[0]['pkid']
print myds[0]['tduein']
self.pwvoyage.moveToPK(KeyValue)
print self.pwvoyage.Record.pkid
print self.pwvoyage.Record.tduein
dabo.ui.callAfter(self.update)
The output from above is:
1102 #this is the PK
2009-11-20 # a date field (correct)
1102 #this is the PK after moveToPK
2008-07-25 #this is a old date from a different record. Not correct!
As you can see the dates do not match - but the pk's match???
bizobj define:
\class WarehousepwvoyageBizobj(dabo.biz.dBizobj):
def afterInit(self):
self.DataSource = "warehouse.pwvoyage"
self.KeyField = "pkid"
self.addFrom("warehouse.pwvoyage")
self.addField("mnotes")
self.addField("cvoyage")
self.addField("cvoyage_sfx")
self.addField("cuid")
self.addField("cimporter")
self.addField("pkid")
self.addField("ccontact")
self.addField("cemail")
self.addField("cberth")
self.addField("cphone1")
self.addField("cphone2")
self.addField("fk_portid")
self.addField("nfreedays")
self.addField("tduein")
self.addField("cterminal")
self.addField("cfax")
self.addField("fk_vesselid")
self.addField("tarrive")
self.addField("cvimpref")
self.addField("caddress")
self.addField("corigin")
self.addField("cpier")
_______________________________________________
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/1786410.g1BRhLDmma@linux-12