Creating the user-defined routines
About this task
The Mercury DataBlade® module uses two user-defined routines to prevent users from entering values below absolute zero in the data types CTemp and FTemp. In this DataBlade® module, you implement Assign() functions for the FTemp and CTemp data types. The C functions that implement the Assign() functions are named FTempAssign() and CTempAssign(). The server calls the appropriate routine before it stores a value for either of the two temperature types.
To create the Assign() functions:
Procedure
- Choose and type the following
information, once for each routine, in the New Routine wizard.
Routine property FTempAssign value CTempAssign value Routine Name (SQL) assign assign Language C C Return type FTemp CTemp Statement Local Variables No No Arguments Name: temperature, Type: FTemp Default: leave blank Name: temperature, Type: CTemp, Default: leave blank Routine Calling Options Only the Routine does not accept NULL arguments check box must be checked; clear the Routine may return inconsistent check box. Only the Routine does not accept NULL arguments check box must be checked; clear the Routine may return inconsistent check box. Routine Name (C) FTempAssign CTempAssign Shared object path Default Default Behavior of Routines Routine is well-behaved Routine is well-behaved Special Stack Requirements None None Cost of a Routine 0 0 Related Routines None None Object grant privileges Grant execute privileges Grant execute privileges - Click Finish and then choose to save your project.