Hi,

I'm creating a simple accounting system and I let users have multiple databases
for different companies (mainly just so I can create a demo database and users
can create their own test systems).
I'm wanting functionality so I can create, open and close a database.  The
problem I have is with the close! How do I close a connection?

I'm using SQLObject 0.7.0 and to open a SQLite database I do ...

   filename=filename.replace(':', '|')
   connection_string = 'sqlite:/' + filename
   connection = connectionForURI(connection_string)
   sqlhub.processConnection = connection

Everything from now on uses this connection.   I can run this again with a
different filename and everything from then on will use the new connection. 
But the original connection stays "open" (is that the correct word) until I
terminate the instance of Python I'm running.

Note: I started using straight SQLite (which is still really nice) but using
SQLOject has simplified code and increased robustness.  It's a nice library ;)

Any help very much appreciated.

Thanks,

Ray Smith



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to