Ed Leafe schrieb: > On Apr 13, 2009, at 8:28 AM, Sibylle Koczian wrote: > >> Exactly, and the where clause is added by the SQLBuilder method. I >> just >> added a ticket (1228) to the tracker. > > Just a hunch: what if you change the DataSource to the alias? You > said you did the following: > >> class BizEmpProj(dabo.biz.dBizobj): >> >> def initProperties(self): >> self.DataSource = 'employee_project' > > But the DataSource is used by SQL Builder to determine the name of > the table to use when constructing the query. Let me know what happens > when you change the DataSource to match the alias you used elsewhere. >
That doesn't work. Error message at the start of the application: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line14574, in <lambda> lambda event: event.callable(*event.args, **event.kw) ) File "/home/sib/svn_src/dabo_trunk/dabo/ui/uiwx/dPemMixin.py", line 330, in _afterInitAll self.afterInitAll() File "/tmp/tmpWtqxJk.py", line 210, in afterInitAll self.requery() File "/home/sib/svn_src/dabo_trunk/dabo/ui/uiwx/dForm.py", line 482, in requery response = bizobj.requery() File "/home/sib/svn_src/dabo_trunk/dabo/biz/dBizobj.py", line 905, in requery self.requeryAllChildren() File "/home/sib/svn_src/dabo_trunk/dabo/biz/dBizobj.py", line 1435, in requeryAllChildren child.setCurrentParent() File "/home/sib/svn_src/dabo_trunk/dabo/biz/dBizobj.py", line 1331, in setCurrentParent self._CurrentCursor = val File "/home/sib/svn_src/dabo_trunk/dabo/biz/dBizobj.py", line 2027, in _setCurrentCursor self.createCursor() File "/home/sib/svn_src/dabo_trunk/dabo/biz/dBizobj.py", line 181, in createCursor self._syncCursorProps(crs) File "/home/sib/svn_src/dabo_trunk/dabo/biz/dBizobj.py", line 1943, in _syncCursorProps crs.Table = self._dataSource File "/home/sib/svn_src/dabo_trunk/dabo/db/dCursorMixin.py", line 2537, in _setTable flds = self.getFields(table) File "/home/sib/svn_src/dabo_trunk/dabo/db/dCursorMixin.py", line 1974, in getFields flds = self.BackendObject.getFields(tableName, self.AuxCursor) File "/home/sib/svn_src/dabo_trunk/dabo/db/dbFirebird.py", line 141, in getFields pkField = rs[0]["column_name"].strip() IndexError: tuple index out of range And I remember discussions about this in the list, in the context of trying to use two different bizobjs for the same table. Why doesn't the SQLBuilder take the table name from the "AddFrom" call? That contains the table name and the alias. Regards Sibylle -- Sibylle Koczian _______________________________________________ Post Messages to: Dabo-users@leafe.com 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/49e3558f.8010...@t-online.de