Hi,
I'm a newbie whose been working on a little app, a la
http://www.equi4.com/pipermail/metakit/2003-September/001356.html
The basic functionality is almost done, but but I've run into a
stumbling block.
I thought that vw.insert would act like a SQL update statement:
db.getas('metakit[data:S,base:S]')
vw.insert(0,{'data':'hi'}
But, it just created new rows. Now, I have a function:
def updateItem(dictionary,search):
if search != -1:
row = view[search]
for item in description: #This is a global var ['data','base']
setattr(row,item,description.get(item))
db.commit()
else:
error(-1)
But,
233 row = view[search]
234 for item in description:
235 setattr(row,item,description.get(i))
236 db.commit()
237 else:
builtin setattr = <built-in function setattr>, r = <PyRowRef object>,
i = 'last', d = {'first': 'borked', 'last': 'bork'}, d.get = <built-in
method get of dict object>
AttributeError: delete of nonexistent attribute
args = ('delete of nonexistent attribute',)
What is the recommended way to update an existing row?
Thanks in advance.
Luis
_____________________________________________
Metakit mailing list - [email protected]
http://www.equi4.com/mailman/listinfo/metakit