How do I handle fieldnames in Metakit 2.0

Anders Eriksson ame at swipnet.se
Thu Mar 9 17:17:30 EST 2000


Hello!

I'm trying to create an application which uses Metakit 2.0 for python
as the database. One of the things that I can't figure out is how to
handle the field names or column names.

I have a database table with about 20 columns so I created a list
which contains all the names for the columns.
flist = ['name','email']

 But I can't use these names in the call to Metakit.

if I want to add a record (row) then I use the
vw.append(name='Anders',email='ame at swipnet.se')

but if I want to build this statement dynamicle How do I do it. The
column names (name, email) isn't a string and the whole expression
(within the parenteses) isn't a string...

The best I can do is create a string that looks like
str = "name='Anders',email='ame at swipnet.se'"
but that wont work in vw.append(str)

Anyone that understands my question? 

// Anders




More information about the Python-list mailing list