1 Reply Latest reply on Aug 16, 2013 12:21 PM by philmodjunk

    What is the best way to write a script to lock a database?

    JoeWilson

      Title

      What is the best way to write a script to lock a database?

      Post

           Is it possible to write a script that will freeze (stop working or lock) a database after a set time [48 hours (time dependent) or three openings (numerical access dependent) ]? If so, what is the best way to write it and incoporate it in a database? I want to send a client a fully functioning database to evaluate but (for obvious reasons) would like to protect the it. Thanks in advance for your help.

        • 1. Re: What is the best way to write a script to lock a database?
          philmodjunk

               Add a table to your database.

               Define a field in it to track either the number of times that a file has been opened or the date and time the file is first opened by the client.

               In File Options, you can then use OnFirstWindowOpen to perform a script that checks this field and either uses Quit Application to close or that updates the field (if counting number of times opened) before taking the user to whatever layout you wan them to see when the file opens.