Strange database error when closing Livecode on Windows

Peter Haworth pete at lcsql.com
Thu Jul 12 15:31:08 EDT 2012


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?

Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list