On Dec 21, 2010, at 12:19 AM, John Fabiani wrote:
> Writing data to the array is not working.
>
> self.testbizobj.setFieldVal('pay_by_quarter[0]', 2000)
>
> Traceback (most recent call last):
> File "<input>", line 1, in <module>
> File "/home/johnf/dabo/dabo/biz/dBizobj.py", line 1631, in setFieldVal
> ret = cursor.setFieldVal(fld, val, row)
> File "/home/johnf/dabo/dabo/db/dCursorMixin.py", line 962, in setFieldVal
> _("Field '%s' does not exist in the data set.") % (fld,))
> FieldNotFoundException: Field 'pay_by_quarter[0]' does not exist in the data
> set.
>
> I suspected this because Dabo is looking for real field and not list.
>
> but this works
> self.testbizobj.setFieldVal('pay_by_quarter',[2000,3000,4000,5000])
> self.testbizobj.save()
Close, but...
setFieldVal() takes the column name as its first argument;
'pay_by_quarter[0]' is not the name of the column; 'pay_by_quarter' is. That's
why the second form works.
-- Ed Leafe
_______________________________________________
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/[email protected]