check if database is open liveCode

william humphrey bill at bluewatermaritime.com
Fri Sep 2 08:07:55 CDT 2011


Can anyone help me figure out why this always crashes liveCode if the
database is closed already?

*on* closeStack




   *put* the short name of the defaultStack into tChosenStack

   *if* tChosenStack is "Clients" *then*

      *-- check to see if the database is open*



      *if* VDatabase_IsOpen( gDatabase ) is TRUE *then*

         DatabaseClose

         *get* shutdown()

      *else*

         *answer* "Database closed already."

-- I see the answer but then I have to force quit liveCode

         *-- this always crashes livecode*

      *end* *if*

   *end* *if*

   *pass* closestack

*end* closeStack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20110902/9cfe6607/attachment.html>


More information about the Valentina mailing list