Alpha Video Training
Results 1 to 4 of 4

Thread: 'AUTOEXEC' on exit A5

  1. #1
    Member
    Real Name
    David Boomer
    Join Date
    Apr 2000
    Location
    Brampton Ontario, Canada
    Posts
    662

    Default 'AUTOEXEC' on exit A5

    The autoexec script runs when A5 starts... but, I would like to execute a script whenever A5 exits.

    {The script populates a table with the current values of some of the global variables}.

    I have successfully created a button, [EXIT], that executes the script but users are closing the A5 session without clicking the [EXIT] button.

    I have considered using the SCRIPT_SCHEDULE() function in the autoexec script, but the database is often in use for 2 or three days, 24 hrs / day.

    Is there a way to execute a script when A5 closes?

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: 'AUTOEXEC' on exit A5

    The ON_DATABASE_EXIT() function allows you to "register" code that will be executed when the current database is closed. You can call the function as many times as you want to register as many different code snippets as you want.

    To delete any code that was previously registered, but is no longer wanted, use the SYSTEM_EVENT_DROP("database_exit", name) command, where name is the sub-property of the p.database_exit variable returned by a call to the SYSTEM_EVENT_DATA_GET()function

    The usage of CAN_DATABASE_EXIT() is similar to ON_DATABASE_EXIT(). However, the code that is executed must issue a CANCEL()command in order to prevent the database from closing.

  3. #3
    "Certified" Alphaholic
    Real Name
    Andrew Schone
    Join Date
    Dec 2005
    Location
    Kansas
    Posts
    1,047

    Default Re: 'AUTOEXEC' on exit A5

    On_Database_Exit and Can_Database_Exit scripts

    Stan is fast.
    Andrew

  4. #4
    Member
    Real Name
    David Boomer
    Join Date
    Apr 2000
    Location
    Brampton Ontario, Canada
    Posts
    662

    Default Re: 'AUTOEXEC' on exit A5

    Thanks!!!!

Similar Threads

  1. Autoexec
    By idor in forum Database Design
    Replies: 2
    Last Post: 10-12-2009, 03:01 PM
  2. Exit from X
    By Alan Lucas in forum Alpha Five Version 6
    Replies: 13
    Last Post: 09-30-2007, 09:42 PM
  3. autoexec
    By WillieLucas in forum Alpha Five Version 5
    Replies: 3
    Last Post: 09-23-2002, 09:22 AM
  4. autoexec help
    By Tom Patten in forum Alpha Five Version 4
    Replies: 12
    Last Post: 05-09-2001, 03:59 PM
  5. Exit from A5
    By Barry Potter in forum Alpha Five Version 4
    Replies: 4
    Last Post: 05-08-2000, 06:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •