Strange database error when closing Livecode on Windows

2012-07-12 Thread Peter Haworth
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

Re: Strange database error when closing Livecode on Windows

2012-07-12 Thread Bob Sneidar
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

Re: Strange database error when closing Livecode on Windows

2012-07-12 Thread Peter Haworth
Maybe. But it doesn't happen on Macs, only Windows (haven't tried Linux). I hope Livecode doesn't do that on any platform since it's quite possible that applications will want to do some db housekeeping when they are closed and this would prevent them from doing it. Pete lcSQL Software

Re: Strange database error when closing Livecode on Windows

2012-07-12 Thread Bob Sneidar
Oh, interesting that the Mac version of LC doesn't do that! At any rate, I have gotten into the habit of enclosing ALL my database access commands and functions inside a try catch construct. You never know when the plug has been pulled to your database access, at least from a networking

Re: Strange database error when closing Livecode on Windows

2012-07-12 Thread J. Landman Gay
On 7/12/12 3:56 PM, Peter Haworth wrote: Maybe. But it doesn't happen on Macs, only Windows (haven't tried Linux). I hope Livecode doesn't do that on any platform since it's quite possible that applications will want to do some db housekeeping when they are closed and this would prevent them

Re: Strange database error when closing Livecode on Windows

2012-07-12 Thread J. Landman Gay
On 7/12/12 4:25 PM, J. Landman Gay wrote: On 7/12/12 3:56 PM, Peter Haworth wrote: Maybe. But it doesn't happen on Macs, only Windows (haven't tried Linux). I hope Livecode doesn't do that on any platform since it's quite possible that applications will want to do some db housekeeping when