Re: Error Binding Parameter 0

Rich Shepard <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
On Wed, 20 Dec 2006, Adrian Klaver wrote:

> My next suggestion would to see if the varDlg() functions are really
> returning what you want. Sprinkle some print statements i.e print
> varDlg().varName to see if you are getting the varName.

Adrian,

   Thanks for reminding me of the obvious. I've been doing this to debug the
application, but got so wrapped up with that one statement that I forgot to
back up and look at the data passed to it.

> Also in the OnVarAdd function you assign varDlg() to newVar,you might want
> to use the assigned name i.e. newVar.varName. I don't know how the rest of
> the module is set up but the newVar assignment may be masking varDlg()

   Good point. I'll look at this, too.

   Part of the problem may be that I set up this module with two classes. One
has the UI and connections to the database, the other class is strictly the
dialog box for adding a new variable. Why'd I do it like this? Probably
because I was much newer to python and wxPython last summer when I started
writing this and I was experimenting with what I found in demos, web sites,
and other applications. Other modules have the dialog box as a funcion
within the class. I've no idea if the structure is part of the problem.
Other than the frustration of not working out a solution in several hours,
I'm learning a lot. (The debugging tools I used in C are much more powerful;
last time I used print statements to debug code was in the early 1970s
writing in FORTRAN for the IBM S/360s.)

   Thanks very much. I'll post to the list what I find as I back up and trace
data through the classes.

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.