Re: Custom SQL - Do I need to close the connection?

2007-03-24 Thread James Bennett
On 3/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Do I need to close the connection after I'm done with the results? > I've also recently started receiving 'too many connections' errors... > and thought this might be the reason? Django will automatically close the connection at the end o

Re: Custom SQL - Do I need to close the connection?

2007-03-23 Thread RajeshD
> Do I need to close the connection after I'm done with the results? You shouldn't have to. Django closes the connection at the end of the request. > I've also recently started receiving 'too many connections' errors... > and thought this might be the reason? What database are you using? Can yo

Custom SQL - Do I need to close the connection?

2007-03-22 Thread [EMAIL PROTECTED]
I've recently had to add a way for us to access custom SQL for some really off the wall queries we need to run for reports... def getReportDBCursor(): from django.db import connection return connection.cursor() Do I need to close the connection after I'm done with the results? I've also