On Monday 17 September 2007 09:34, johnf wrote:
> A new problem has come up.
>
> If I make a select such as:
> def getNewLot(oForm,yr,sppk,varpk,oripk):
> curnewlot= oForm.conn.getDaboCursor()
> curnewlot.execute("select nextval('public.lot_seq') as nextlot,
> s.speciesnum, v.varnum, o.norigincode from public.agspecies s left join
> public.agvarieties v on true left join public.agorigins o on true where
> s.pkid=%s and v.pkid=%s and o.pkid=%s" % (sppk,varpk,oripk,))
>
> a call to getfields is executed with an empty "tableName" as a parameter.
> This causes a traceback in dbPostgres that comes from _storeFieldTypes() in
> dCursorMixin.py
>
> In this case "curnewlot" is a throw away temporary cursor.
forgot the traceback
Traceback (most recent call last):
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dControlMixin.py", line 21, in
_onWxHit
self.raiseEvent(dEvents.Hit, evt, *args, **kwargs)
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dPemMixin.py", line 843, in
raiseEvent
super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
**kwargs)
File "/home/johnf/downloads/dabo/dabo/lib/eventMixin.py", line 92, in
raiseEvent
bindingFunction(event)
File "/home/johnf/pyProject/pyProject/RAClasses.py", line 1189, in onSave
self.Form.save()
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dForm.py", line 343, in save
bizobj.saveAll()
File "/home/johnf/downloads/dabo/dabo/biz/dBizobj.py", line 278, in saveAll
startTransaction=False)
File "/home/johnf/downloads/dabo/dabo/biz/dBizobj.py", line 693, in
scanChangedRows
func(*args, **kwargs)
File "/home/johnf/downloads/dabo/dabo/biz/dBizobj.py", line 323, in save
self._validate()
File "/home/johnf/downloads/dabo/dabo/biz/dBizobj.py", line 891, in
_validate
message = self.validateRecord()
File "/home/johnf/pyProject/pyProject/LotsBizobj.py", line 146, in
validateRecord
clot=getNewLot(self.MainForm,datetime.date.today().year,self.getFieldVal('fk_species'),self.getFieldVal('fk_variety'),self.getFieldVal('fk_origin'))
File "/home/johnf/pyProject/pyProject/RAClasses.py", line 2397, in getNewLot
curnewlot.execute("select nextval('public.lot_seq') as nextlot,
s.speciesnum, v.varnum, o.norigincode from public.agspecies s left join
public.agvarieties v on true left join public.agorigins o on true where
s.pkid=%s and v.pkid=%s and o.pkid=%s" % (sppk,varpk,oripk,))
File "/home/johnf/downloads/dabo/dabo/db/dCursorMixin.py", line 311, in
execute
self._storeFieldTypes()
File "/home/johnf/downloads/dabo/dabo/db/dCursorMixin.py", line 434, in
_storeFieldTypes
for field in self.DataStructure:
File "/home/johnf/downloads/dabo/dabo/db/dCursorMixin.py", line 2120, in
_getDataStructure
ds = self.BackendObject.getStructureDescription(self)
File "/home/johnf/downloads/dabo/dabo/db/dBackend.py", line 460, in
getStructureDescription
standard_fields = cursor.getFields()
File "/home/johnf/downloads/dabo/dabo/db/dCursorMixin.py", line 1710, in
getFields
return self.BackendObject.getFields(tableName, self.AuxCursor)
File "/home/johnf/downloads/dabo/dabo/db/dbPostgreSQL.py", line 86, in
getFields
localTableName = tableNameBreak[1]
IndexError: list index out of range
--
John Fabiani
_______________________________________________
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]