[Zope-DB] Page Templates and data manipulation

Chris MacKenzie cm68@st-andrews.ac.uk
Mon, 14 Oct 2002 15:02:59 +0100


Hi,

I am looking for an easy way to take items from a formulator object and pass
the info into an oracle table via a python script.

The bit I am stuck with is building up the sql string for the query:

for key, value in results.items():
    try:
      // loop through results and populate string with
	// result.key and result.key.value
	strSQL = strSQL + result.key + "=" + result.key.value

     // if this is not the last pair in result.items()
     strSQL = strSQL + ", "
    except:
        pass

result = container.sqlInsertApplicants(strSQL)

An online example would be cool if one exists

regards

Chris MacKenzie