On Wed, Aug 8, 2012 at 3:05 PM, Bob Sneidar <b...@twft.com> wrote: > Hi Alejandro. > > I thought I would mention one other thing. Typically SQL databases have an > idle time after which the connection is closed by the host. I have run into > this a lot. When that happens, a new connection will need to be made and a > new ID gotten. Attempting to use the old ID will result in an error. I am not > sure your library will handle this. > > It would not be a problem for me as I am in the habit of connecting, doing my > thing, and then closing the connection, so my methods already account for > this, but novice developers whom your library seems to target might trip on > this fact. > > If you decide to accommodate this, it might also be a good idea to have a > function that gets the current database id, creating a new connection if > necessary. This is the reason that sqlYoga handles the connection for you, > but that may be beyond the scope of your library.
Yes I don't fiddle with the connection. My target is not remote databases but SQLite. That connection will not close. The library works with other databases as well but I don't have connection managing routines. I will research on that and see if it is something doable. I need a reliable way to detect when a database connection is no longer alive. > > Bob > _______________________________________________ > 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 -- http://www.andregarzia.com -- All We Do Is Code. http://fon.nu -- minimalist url shortening service. _______________________________________________ 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