Error Binding Parameter 0

Rich Shepard <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
   This method generates an error I don't understand.

     def OnVarAdd(self, event):
     newVar = varDlg()
     result = newVar.ShowModal()
     if result == wx.ID_OK:
       if self.appData.dbFileName != ' ':
         self.appData.cur.execute("insert into variable (var_name, var_desc, \
                                                    policy_name, sub_policy_name) values \
                                                    (?,?,?,?)", \
                                  (varDlg().varName, varDlg().varDesc,\
                                  varDlg().polName, varDlg().subName))
       self.appData.con.commit()
     newVar.Destroy()

produces

   File "/data1/eikos/variablePage.py", line 238, in OnVarAdd
     (varDlg().varName, varDlg().varDesc,\
pysqlite2.dbapi2.InterfaceError: Error binding parameter 0 - probably
unsupported type.

   Which is parameter 0? What syntax error have I committed here?

TIA,

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)    |            Accelerator
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.