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. 

Bob


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?
> 
> Pete
> lcSQL Software <http://www.lcsql.com>
> _______________________________________________
> 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

Reply via email to