Use this system procedure to add or delete SQL table scripts in the consolidated database.
ml_add_table_script ( 'version', 'table', 'event', 'script' )
Syntax | Description |
---|---|
version |
VARCHAR(128). The version name. |
table |
VARCHAR(128). The table name. |
event |
VARCHAR(128). The event name. |
script |
TEXT. The script contents. For Adaptive Server Enterprise, this parameter is VARCHAR(16384). For IBM DB2 LUW, this parameter is VARCHAR(4000). For Oracle, this parameter is CLOB. |
To delete a table script, set the script contents parameter to null.
When you add a script, the script is inserted into the ml_script table and the appropriate references are defined to associate the script with the table, event and script version that you specify. If the version name is new, it is automatically inserted into the ml_version table.
The MobiLink server needs to be restarted for the specified script changes to take effect, unless the MobiLink server was started with the -zf mlsrv12 option. The -zf option causes the MobiLink server to check for script changes at the beginning of each synchronization.
Running the MobiLink server with the -zf option has a negative impact on MobiLink server performance and should be avoided whenever possible.
The following command adds a table script associated with the upload_insert event on the Customer table.
call ml_add_table_script( 'default', 'Customer', 'upload_insert', 'INSERT INTO Customer( cust_id, name, rep_id, active ) VALUES ( {ml r.cust_id}, {ml r.name}, {ml r.rep_id}, 1 )' ) |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |