On Jan 8, 2008, at 6:11 PM, johnf wrote:

> So I think we did the following:
> biz=self.PrimaryBizobj
> biz.new()
> #the empty record displayed on a grid
> biz.Record.FirstName="Harry"
> biz.getDataSet()
> # "Harry" appears in the data
> biz.save()
> # no error message
> biz.requery()
> # "Harry' is gone.

        I think that the problem is that the direct access of the field is  
bypassing the memento logic. This was added for efficiency, so that  
we would not have to scan a huge dataset to find the one or two  
modified records.

        Try changing the code to read:

biz=self.PrimaryBizobj
biz.new()
#the empty record displayed on a grid
biz.setFieldVal("FirstName", "Harry")

... followed by the rest.

> #but I can
> biz.execute("insert into customers (firstname) values ('Harry')")
> and all works????????

        Because you are not relying on the memento system, since you are  
directly executing code; in this case, the bizobj is simply passing  
the code through and not doing anything like validation, etc., that a  
bizobj would normally do.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
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/dabo-users/[EMAIL PROTECTED]

Reply via email to