On Jan 10, 2008, at 1:06 AM, Simen Haugen wrote:
> class MatchBiz(dbiz.dBizobj):
> def beforeInit(self):
> self.Caption = "Matches"
> self.Encoding = "latin-1"
> self.DataSource = "tbl_matches"
> self.KeyField = "project,bnummer,telefonval"
> self.AutoPopulatePK = False
OK, that looks good so far. How is the SQL for the bizobj created?
And do you have your own code for PK generation?
> I bind this datasource to a grid. Calling bizobj.new() creates a new
> record. Editing in a grid reflects the values in the dataset. When
> calling save() I get no messages at all. Calling saveAll() gives me an
> exception, "Invalid row specified".
> Even if I answer No or Cancel when asking to save to data I get this
> error.
That behavior is consistent with the bizobj thinking that there are
no changes; i.e., a new, unchanged record, which will get reverted on
save() with the default of SaveNewUnchanged = False. That's the cause
of the saveAll() error, as it tries to return to the reverted row.
I'll be in class all day again, but if you can send me some basic
code that I can use to reproduce this problem, I'll work on it when I
get back. Include the code to generate your database so that I can
work with something. Either create a ticket in Trac and attach the
code, or send it to me personally if you don't want to post it publicly.
-- 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]