TableSync

(ODBC Manager Library)

Description:              Synchronizes the fields matching a specified criteria within matching tables in two databases.  Should be run as a called module, waiting for completion. Do not call as a subroutine.

Returns:                    Nothing

Usage:                       Script

 Format:                    \ODBCManager\TableSync(  DSNSource,  DSNDest,  TableName,  WhereFields,  WhereOperators,  WhereValues,  WhereAND,  SourceUsername,  SourcePass,  DestUsername,  DestPass, [ TransObj,]  NRecords,  CurrRecord)

Parameters:          DSNSource    { text }  { required }  { no default: }

                                                 Data source name of the database to retrieve data from.

                             DSNDest    { text }  { required }  { no default: }

                                                 Data source name of the destination database to send data to

                             TableName    { text }  { required }  { no default: }

                                                 Table name to read/write in both databases

                             WhereFields    { Array of text }  { required }  { no default: }

                                                A text array of field names to select using an SQL WHERE clause

                             WhereOperators    { Array of text }  { required }  { no default: }

                                                A text array of operators to use when selecting fields using an SQL WHERE clause

                             WhereValues    { Array of text }  { required }  { no default: }

                                                A text array of values to use when selecting the above fields using an SQL WHERE clause

                             WhereAND    { Boolean }  { required }  { no default: }

                                                Set to true (1)  if  the fields in the SQL WHERE clause are to be AND'ed.  Otherwise, OD'ed

                             SourceUsername    { text }  { required }  { no default: }

                                                 User name for source db

                             SourcePass    { text }  { required }  { no default: }

                                                A password  for source db

                             DestUsername    { text }  { required }  { no default: }

                                                A user name for destination db

                             DestPass    { text }  { required }  { no default: }

                                                A password  for destination db

                             TransObj    { Object }  { optional }  { no default: }

                                                The object value of transaction

                             NRecords    { numeric }  { required }  { no default: }

                                                A number of records to synchronize

                             CurrRecord    { numeric }  { required }  { no default: }

                                                 Current record being written

Comments:               This module is a member of the ODBCManager Library, and must therefore be prefaced by \ODBCManager\, as shown in "Format" above.