Re: database connection

2011-10-07 Thread Gabriel Genellina
En Fri, 07 Oct 2011 02:18:04 -0300, masood shaik escribió: can u please tell me how we can connect to database without changing the permission of db file using sqlite3 The OS user who executes the Python script must have read (and write, usually) access to the database file - *any* OS us

Re: database connection error - postgresql

2009-03-30 Thread D'Arcy J.M. Cain
On Mon, 30 Mar 2009 13:30:18 +0530 bijoy wrote: > conn=pg.connect("secondbooks.db") > pg.InternalError: FATAL: database "secondbooks.db" does not exist > In fact i have a database called secondboo

Re: database connection error - postgresql

2009-03-30 Thread bijoy
hi, I figured out these too. Pls excuse me Thanks Bijoy On Mon, Mar 30, 2009 at 1:30 PM, bijoy wrote: > Hi, > > *code:* (only the class definiton and Database connection part) > > import pg > > __metaclass__=type > > class addbook: > > conn=pg.connect('secondbooks.db') > curs

Re: Database connection caching

2005-03-19 Thread lbolognini
Thanks everybody for their replies. Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: Database connection caching

2005-03-18 Thread Istvan Albert
[EMAIL PROTECTED] wrote: Hi all, is there an alternative way of: - create a connection object - open the connection - close the connection psycopg, a Postgresql database adapter does connection pooling automatically http://initd.org/projects/psycopg1 Most Zope database adapters also have implicit c

Re: Database connection caching

2005-03-18 Thread Simon Brunning
On 18 Mar 2005 04:52:03 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > is there an alternative way of: > > - create a connection object > - open the connection > - close the connection > > every time one has to run a query. It's actually morte like: create connection create cursor execut

Re: Database connection caching

2005-03-18 Thread Skip Montanaro
Lorenzo> is there an alternative way of: Lorenzo> - create a connection object Lorenzo> - open the connection Lorenzo> - close the connection Lorenzo> every time one has to run a query. Sure, create a Queue.Queue object and stuff a number of connections into it. When you wan

Re: Database connection caching

2005-03-18 Thread Swaroop C H
On 18 Mar 2005 04:52:03 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi all, > > is there an alternative way of: > > - create a connection object > - open the connection > - close the connection > > every time one has to run a query. Why not use cursor objects with a single connection