Complete these instructions to create a trigger.
subroutine subname(record) * "record" contains list of columns separated by * 0xFE characters (minus the primary key). * To get the primary key, use the access(10) * function. primarykey = access(10); * Do any desired trigger processing * When complete, the resulting record may be * modified by modifying the "record" variable.Record = … * If the update should fail due to an integrity * violation or some other reason, then the * "inputerr" statement displays an error message * and rolls back ALL updates in the current * transaction. if update.fails then inputerr 'Error Message' return
Log to the account where the D3 file corresponding to the SQL table exists.
Enter ud file_name
Due to SQL naming conventions, the D3 filename, file_name, may not be the same as the SQL tablename.
Note that the older ed editor can be used if you are more comfortable with that editor.
If using the ud command, press <Return> several times until the cursor is on the row marked correlative.
where account and file are the account and file where the FlashBASIC program resides, and subroutine_name is the name of the program.
Press CTRL-X followed by the F key to file, or apply, the changes.
With the trigger in place, any database update, whether from SQL or from a legacy application, will result in a call to the applied code.