Re: Please Explain This Error

Rich Shepard <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
On Thu, 2 Nov 2006, [email protected] wrote:

> Ok, then let me suggest this, what I do is declare cur and con as global
> variables then I don't have to do anything. In some instances I have a
> SQLite class as well that only creates a new connection when there is
> not one.

Greg,

   I'm going to recreate dbMethods.py with one class that holds the openDB()
(opens the database, or creates a new one if that name does not exist) and
the closeDB(). It almost worked before, this time I'll make sure it does.
This is more sensible than fighting to figure out why 'self.cur.execute(...'
works in some modules and not others.

Thanks very much,

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.