Replicates entries in Meridian Enterprise tables. When called, UpdateTable will make a remote call to the specified GCF share, retrieve the rows of the specified table, and merge them with the rows in the local table.
Syntax
Function UpdateTable(Table, SourceShare, PrimaryKeyColumns, OwnerColumn)
Name | Description |
---|---|
Table |
The name of the table to be updated. |
SourceShare |
The GCF share name from which to retrieve the data. |
PrimaryKeyColumns |
A variant array of strings that are the names of the columns that compose the primary key of the table. |
OwnerColumn |
When row ownership is used, the name of the column that specifyies the owner of each record. Otherwise, an empty string. |
Return value
When successful, returns an empty string. When an error occurred, returns the error message.
Remarks
By default, a row in the local table will be updated when the primary key matches the primary key of the received row and a received row will be inserted when there is no matching primary key in the local table. As a consequence, rows will never be deleted from the synchronized tables. When simultaneous updates are made to matching rows on different sites, the result depends on the order of synchronization. The share that calls UpdateTable first will lose its local updates.
Alternatively, a column in the table can be used to specify which GCF share is the owner of a row. In this case, UpdateTable will retrieve all rows owned by the specified remote share and replace all of the rows in the local table that are owned by the specified remote share. This way, all new rows, updates, and deletions in the remote share are replicated locally when UpdateTable is called. In this situation, all rows in the table should have in the owner column a value from the ShareName column in the GCF Shares table.
Related information