I just cannot understand why this won't work, but I don't use much
bizobjs, so its probably my fault :)
All three fields are primary keys.
If I use bizobj.new() and uses a grid to edit the values, then
saveAll(), the changed rows is [None, None, None]... And of course gives
an error when trying to move thru the rows.
Some other tests:
# Try to save
>>> b = self.getBizobj()
>>> b.getDataSet()
()
>>> b.new()
>>> b.getDataSet()
({'project': u'reshn011', 'bnummer': u'', 'telefonval': u''},)
>>> b.save() # Hmmm.. no error at least
>>> b.saveAll()
Traceback (most recent call last):
File "c:\Documents and Settings\simen\My
Documents\Projects\resh011\trunk\src\<string>", line 1, in ?
File
"c:\Python24\Lib\site-packages\Dabo-0.8.3-py2.4.egg\dabo\biz\dBizobj.py"
, line 327, in saveAll
startTransaction=False)
File
"c:\Python24\Lib\site-packages\Dabo-0.8.3-py2.4.egg\dabo\biz\dBizobj.py"
, line 715, in scanChangedRows
self._moveToRowNum(row)
File
"c:\Python24\Lib\site-packages\Dabo-0.8.3-py2.4.egg\dabo\biz\dBizobj.py"
, line 978, in _moveToRowNum
self._CurrentCursor.moveToRowNum(rownum)
File
"c:\Python24\Lib\site-packages\Dabo-0.8.3-py2.4.egg\dabo\db\dCursorMixin
.py", line 1521, in moveToRowNum
raise dException.dException, _("Invalid row specified.")
dException: Invalid row specified.
# It seems this problem can be because I don't have SaveNewUnchanged set
to True. This should not try to update anything at all I would have
thought, but it tries to update with the rows [None] instead.
# Try to delete
# First we create a couple of records
>>> b = self.getBizobj()
>>> b.getDataSet()
()
>>> b.new()
>>> b.getDataSet()
({'project': u'reshn011', 'bnummer': u'', 'telefonval': u''},)
>>> b.new()
>>> b.getDataSet()
({'project': u'reshn011', 'bnummer': u'', 'telefonval': u''},
{'project': u'reshn011', 'bnummer': u'', 'telefonval': u''})
# Then we try to delete them. Deleting the first works, but the second
fails
>>> b.delete()
>>> b.getDataSet()
({'project': u'reshn011', 'bnummer': u'', 'telefonval': u''},)
>>> b.delete()
Traceback (most recent call last):
File "c:\Documents and Settings\simen\My
Documents\Projects\resh011\trunk\src\<string>", line 1, in ?
File
"c:\Python24\Lib\site-packages\Dabo-0.8.3-py2.4.egg\dabo\biz\dBizobj.py"
, line 530, in delete
raise StandardError, e
dException: No records deleted
>>> b.first()
>>> b.delete()
Traceback (most recent call last):
File "c:\Documents and Settings\simen\My
Documents\Projects\resh011\trunk\src\<string>", line 1, in ?
File
"c:\Python24\Lib\site-packages\Dabo-0.8.3-py2.4.egg\dabo\biz\dBizobj.py"
, line 530, in delete
raise StandardError, e
dException: No records deleted
>>>
_______________________________________________
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]