Re: Please Explain This Error

[email protected]
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <OFCBC5702F.6B0FC3BE-ON8525721A.007218B4-8525721A.00723123@bankofny.com>
Where is the line self.cur = self.con.cursor() You have to allocation
the cursor from the connection.

Thanks,

Greg Givler
Information Technology
Lockwood®
10 Valley Stream Parkway
Malvern, PA 19355
Phone: (484) 605-4826
Email: [email protected]


                                                                                                                                           
                      Rich Shepard                                                                                                         
                      <rshepard@appl-ecosys        To:       "For users of the pysqlite database module." <pysqlite-qW/[email protected]>        
                      .com>                        cc:                                                                                     
                      Sent by:                     Subject:  Re: [pysqlite] Please Explain This Error                                      
                      pysqlite-bounces@list                                                                                                
                      s.initd.org                                                                                                          
                                                                                                                                           
                                                                                                                                           
                      11/02/2006 03:32 PM                                                                                                  
                      Please respond to                                                                                                    
                      "For users of the                                                                                                    
                      pysqlite database                                                                                                    
                      module."                                                                                                             
                                                                                                                                           
                                                                                                                                           




On Thu, 2 Nov 2006, Christian Boos wrote:

>>      natComp = []
>>      self.cur.execute("select * from component where
category=natural;")
>      cur.execute("select * from component where category=natural;")
>>      row = cur.fetchone()
>
> From the limited context you gave, it seems to be a simple typo, isn't
it?

Christian,

   If so, I'm just not seeing it. The cursor has to be tied to the
instance
of the class with a prepended 'self.'.

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
_______________________________________________
pysqlite mailing list
pysqlite-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/pysqlite

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please call the help desk at ext 4850
______________________________________________________________________




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
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.