Re: Error Opening Database
Rich Shepard <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 23 Oct 2006, [email protected] wrote: > I think you need this: > > self.con = sqlite.connect('projname', isolation_level=None) > > unless projname is a variable. Greg, It _is_ a variable. The sequence is: 1) When application is invoked, a message pops up reminding us that a file (i.e., sqlite3 database) needs to be opened or created first. 2) From the File->New menu the following method is called: def OnFileNew(self, event): """ Create a new file and open it.""" self.dirname = '' wd = wx.DirDialog(self, "Chose the default directory", ".", style=wx.DD_NEW_DIR_BUTTON) if wd.ShowModal() == wx.ID_OK: dirname = wd.GetPath() ted = wx.TextEntryDialog(self, "Enter the project name", "New Project Name", "", style=wx.RAISED_BORDER|wx.OK|wx.CANCEL) if ted.ShowModal() == wx.ID_OK: projname = ted.GetValue() tcName = self.mainNB.pane_1.tcName tcName.WriteText(projname) self.OnOpenDB(projname) ted.Destroy() wd.Destroy() 3) Three lines from the bottom of that method is the call to OnOpenDB. Of course, this does not mean to imply that I have it correct at all. :-) Thanks, 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