On Dec 12, 2007 6:26 AM, Ed Leafe <[EMAIL PROTECTED]> wrote:
> On Dec 11, 2007, at 11:18 PM, Lukasz Szybalski wrote:
>
> > File "/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/
> > biz/dBizobj.py",
> > line 715, in scanChangedRows
> > self._moveToRowNum(row)
> > File "/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/
> > biz/dBizobj.py",
> > line 978, in _moveToRowNum
> > self._CurrentCursor.moveToRowNum(rownum)
> > File "/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/
> > db/dCursorMixin.py",
> > line 1521, in moveToRowNum
> > raise dException.dException, _("Invalid row specified.")
> > dabo.dException.dException: Invalid row specified.
>
> OK, I need your help to debug this. Open your dBizobj.py file (the
> one in '/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/
> biz/dBizobj.py') in any plain text editor, and add the one debugging
> statement after line 713 so that your code looks like:
>
> 711 for key, cursor in cursors.iteritems():
> 712 self._CurrentCursor = key
> 713 changedRows = self.getChangedRows(includeNewUnchanged)
> print "CHANGED", changedRows
> 714 for row in changedRows:
> 715 self._moveToRowNum(row)
> 716 try:
> 717 func(*args, **kwargs)
> 718 except:
> 719 # Reset things and bail:
> 720 self._CurrentCursor =
> old_currentCursorKey
> 721 self._positionUsingPK(old_pk)
> 722 raise
>
> Run the app the same way again, and then post the debug output you
> get.
>
ok. I added the change. And I noticed that the erorr was talking bout
my 2 time fields being null (createdtime, updatedtime). Appwizard
didn't create these fields in the browse, Is there a reason why? Does
it have some kind of hard coded limit on numbers of fields per window,
or it filters out created,updatedtime?
So I went into db and changed them to allow null. I was able save the
record if I didn't modify the compund key fields (-1 ,-1) It showed up
in db as (0,1) then I was trying to add another one. Update form
showed (-2,-2) which save the record as (0,2), so that seems to be
working if no key fields are changed.
I added the change you wanted me to add in second item, and it did
show the sql statements when saving. It displays results only when
saving, so when I modify my first key (workjournal (to 1) ) I get
this:
File
"/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/biz/dBizobj.py",
line 363, in save
cursor.save()
File
"/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/db/dCursorMixin.py",
line 1144, in save
saverow(self.RowNumber)
File
"/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/db/dCursorMixin.py",
line 1118, in saverow
self.__saverow(row)
File
"/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/db/dCursorMixin.py",
line 1226, in __saverow
self.BackendObject.noResultsOnSave()
File
"/usr/lib/python2.4/site-packages/Dabo-0.8.3-py2.4.egg/dabo/db/dBackend.py",
line 114, in noResultsOnSave
raise dException.dException, _("No records updated")
dabo.dException.dException: No records updated
As far as the keys go. Normally I would have to pass in the first key
(workjournal_id), and the second key(workjournalupdate_id) will get
auto incremented based on whats in the database. Saving the first key
as 0 will work but I will need to be able to change key1 to some other
value and key2 will get auto incremented.
I should also be able to pass in a Key2 if it will match the db. (not
sure what happens when its not but I we shouldn't worry about that I
guess.)
Thanks,
Lucas
_______________________________________________
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]