CopyRecords

(ODBC Manager Library)
Description:

Copy record(s) from a database and inserts the values back into the same table with the desired change to one field.

It will destroy any existing records with the same name. Should be run as a called module, waiting for completion. Do not call as a subroutine.

Usage: Script Only.
Returns:An error code if one results from the action, otherwise 0.
Related to:AddConnection | BuildDelete | BuildInsert | BuildSelect | BuildUpdate | ConvertToDbDate | ConvertToDbTime | ConvertToDbTimeStamp | ConvertToVTSDate | ConvertToVTSTime | ConvertToVTSTimeStamp | DBDropList | DBGridList | ErrMessage | ExecuteQuery | ExecuteQueryCachedFlushCache | FormatBatchQuery | GetConnList | ResultFormat | StatsWin | TableSynch | Transaction | TransactionCached
Format: \ODBCManager.CopyRecords(  DSN,  TableName,  KeyField,  OrgKeyValue,  CopiedKeyValue,  Username,  Password [,  TransactionObj])
Parameters: 
DSN
Required. Data source name of the database to use
TableName
Required. Table name to read and write in both databases
KeyField
Required. Field name to use for the SQL WHERE clause
OrgKeyValue
Required. Key values of the records when complete
CopiedKeyValue
Required. Key values of the records to copy
Username
Required. User name for database access
Pass
Required. Password  for database access
TransObj
Required. Value of transaction object
Comments:This module is a member of the ODBCManager Library, and must therefore be prefaced by \ODBCManager, as shown in "Format" above.