Step 5: code your application to use the user object

What you have done so far In the previous steps, you defined a remote stored procedure as an external function for the u_trans_database standard class user object. You then specified u_trans_database as the default global variable type for SQLCA. These steps give your PocketBuilder application access to the properties and functions encapsulated in the user object.

What you do now You now need to write code that uses the user object to perform the necessary processing.

In your application script, you can use PowerScript dot notation to call the stored procedure functions you defined for the user object, just as you do when using SQLCA for all other PocketBuilder objects. The dot notation syntax is:

object.function ( arguments )

For example, you can call the sp_raise stored procedure with code similar to the following:

double ld_result
double ld_inputsalary
ld_result = sqlca.sp_raise( ld_inputsalary )

StepsTo code your application to use the user object:

  1. Open the object or control for which you want to write the script.

  2. Select the event for which you want to write the script.

  3. Write code that uses the user object to do the necessary processing for your application.

  4. Compile the script to save your changes.