CopyRecords

(ODBC Manager Library)

Description:              This module 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.   

Returns:                An error code if one results from the action, otherwise 0.

 Format:                    \ODBCManager\CopyRecords(  DSN,  TableName,  KeyField,  OrgKeyValue,  CopiedKeyValue,  Username,  Password [,  TransactionObj])

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

                              Data source name of the database to use

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

                             Table name to read and write in both databases

                             KeyField       { text }  { required }  { no default:}

                             Field name to use for the SQL WHERE clause

                             OrgKeyValue          { text }  { required }  { no default:}

                             Key values of the records when complete

                             CopiedKeyValue     { text }  { required }  { no default:}

                             Key values of the records to copy

                             Username    { text }  { required }  { no default:}

                             User name for database access

                             Pass   { text }  { required }  { no default:}

                             Password  for database access

                             TransObj      { object }  { optional }  { no default:}

                             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.