Hi James, I'd leave them open until you quit the app. You might also think about using the ATTACH command for the second and subsequent connections so they'll all be open on the same connection. This allows you to, for example, define JOINs across databases, although you'll need to change the references to anything in the attached databases.
Pretty sure you need to load extensions for each connection, so the ATTACH approach will help there too. Pete lcSQL Software On Apr 24, 2014 7:49 PM, "James Hale" <ja...@thehales.id.au> wrote: > 1. Open and close database connections. When? > Obviously you need to open a connection to access a database, but when do > you need to close it? > Does it close without you doing anything? > I have the need to connect to four db's while running my app. > Access to a couple of these is sporadic but constant across a user session > with the app. > Can I just open a connection to them all on the app's launch and then > close the connection of quitting? Currently I reassert the connection on > most accesses. Is this a bad thing to do? > > 2. SQLite's new ability to load a runtime extension. What does it attach > to? > I have compiled a couple of extensions to SQLite for my app. I use them in > two distinct db's that I connect to. Do I need to load the extension for > each db or only once. > In other words is it loaded for the engine itself or does the load only > apply to the specific database I am connecting to at the time? > > Thanks in advance > > James > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode