MDAC 2.5 SDK - OLE DB Samples


 

Table Copy Example

This example describes the steps involved in connecting to a data source, selecting the data to be copied, and copying the data using the Table Copy sample. Complete each of these procedures by performing these steps:

  1. Start TableCopy.exe.

  2. Click Connect to connect to the source data source and click the Machine Data Source tab.

  3. Select your ODBC data source  and click OK.

    Note    Use the ODBC Data Source Administrator to configure your data source. (OLE_DB_NWind_Jet is no longer available from this installation as a sample database.)

  4. In the Tables list, select the Customers table.

  5. Click Next to move to step 2 of the wizard, then click Next again to move to step 3 of the wizard.

  6. Click Connect to connect to the target data source and click the Machine Data Source tab.

  7. Select your ODBC data source as the target data source and click OK.

  8. Type NewCustomers as the new table name in the To box.

  9. Click Next to move to step 4 of the wizard.

  10. Under Create, clear the Indexes box.

  11. Under Insert, select the InsertRow (Immediate) button.

  12. Click Next again to move to step 5 of the wizard.

  13. Click Finish. The Table Copy sample will create the NewCustomers table and copy the data from the Customers table to the NewCustomers table.