We are trying to use them to generate a report.... where a bunch of calculations are being made... via a custom sql query... then hand all of the results back to my django view to display.
After they are displayed...they can be nuked...but the guy working on this piece told me he couldn't get the temp table to stick around long enough with the django connection to be able to get the results back because I believe he runs several queries...then compiles them all into one be result ( not sure on this, as he is writing it, and I haven't reviewed his code as of yet ) ... so he started hardcoding the db un/password in there and creating a mysqldb connection...which I didn't agree with...so thought I'd ask about it on here. I'll have to look deeper into his code to see exactly what he may be doing wrong...but I thought I'd ask on here...just to find out if there were any special types of things you needed to do with temp tables. On Apr 16, 5:54 am, Atilla <[EMAIL PROTECTED]> wrote: > > Is there a way to force the db connection to stay open if you are > > excecuting raw sql that is creating a temp table? When the connection > > closes...the temp tables go away. > > Temp tables are meant to be temporary. You can't guarantee, even with > persistent db-connection pooling that the same user would use the same > connection on the next request, so you can't guarantee that the temp > table, with the data from the previous request will be there. > > What exactly are you trying to do - temporary tables are the good > solution to quite specific problems, there might be a better way to do > whatever you're attempting. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

