If you create an event handler without a schedule or system event to trigger it, it is executed only when manually triggered.
Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA authority.
In the left pane, right-click Events and choose New » Event.
In the What Do You Want To Name The New Event field, type a name for the event and click Next.
Select Manually and click Next.
Select Enable This Event, Execute At All Databases, and then click Next.
Type a comment describing the event and click Finish.
In the SQL pane, type the SQL statements for your event.
From the File menu, choose Save.
Connect to the database as a user with DBA authority.
Execute a CREATE EVENT statement with no schedule or WHERE clause. The restricted syntax of the CREATE EVENT is as follows:
CREATE EVENT event-name HANDLER BEGIN ... //event handler END
If you are developing event handlers, you can add schedules or system events to control the triggering of an event later, either using Sybase Central or the ALTER EVENT statement.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|