Strange database error when closing Livecode on Windows
bobs at twft.com
Thu Jul 12 16:10:17 EDT 2012
My guess would be that because LC closes all database connections itself when you quit, that LC has already closed the database connection when your script tries to do it again, with a now defunct database id.
On Jul 12, 2012, at 12:31 PM, Peter Haworth wrote:
> I have a closeStack handler on card 1 of my main stack that calls
> revCloseDatabase passing a global variable in as the database id. It
> checks that the variable is an integer before calling revCloseDatabase just
> in case the db wasn't opened.
> This ll works fine when I close the stack. However, if I exit Livecode on
> Windows with the stack open, I get a runtime error message "revdberr,
> invalid connection id" on the revCloseDatabase command. Thsi only happens
> on Windows, not Mac… exactly the same code.
> I fixed the problem by enclosing the revCloseDatabase in a try/catch block
> with no action for the catch but does anyone know why this might be
> happening? Maybe Livecode automatically closes any open databases on exit
> on Windows boxes but not on Macs?
> lcSQL Software <http://www.lcsql.com>
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode