Xbasic

DatabaseSnapshot Events

Description

Available events for working with DatabaseSnapshots.

Discussion

The load and store functions for snapshot objects have a string argument named EventScript. This argument can contain an event script so that you can respond to milestones in the process of loading and storing data; usually for the purpose of displaying a progress dialog or creating a log of the process.

The event script is something you create using one or more of the following functions. You implement the function. The function is called when the event associated with the function is triggered by one of the snapshot objects.

For example:

FUNCTION DatabaseBegin(Context as P, Action as C, TablesExpected as N)
    Statusbar.Set_Text("Database " + Action + " beginning. " + TablesExpected + " tables expected.")
END FUNCTION

FUNCTION DatabaseEnd(Context as P, Action as C, TablesExpected as N)
    Statusbar.Set_Text("Database " + Action + " complete.") 
END FUNCTION

FUNCTION TableBegin(Context as P, Action as C, TableName as C)
    Statusbar.Set_Text("Table " + Action + " beginning for table " + TableName)
END FUNCTION

FUNCTION TableEnd(Context as P, Action as C, TableName as C)
    Statusbar.Set_Text("Table " + Action + " complete for table " + TableName)
END FUNCTION
Function
Description
DatabaseBegin()

Called when a batch of updates is about to be processed for a database.

DatabaseEnd()

Called at the end of processing for a database level update.

TableBegin()

Called when a batch of updates is about to be processed for a table.

TableEnd()

Called at the end of processing for a table level update.

UpdateBegin()

Called when a batch of updates is about to be processed.

UpdateEnd()

Called at the end of processing.

UpdateProgress()

Called repeatedly as rows are processed.

See Also