Xslatezp.exe Data Translation using JET as a Medium

ID: Q196379


The information in this article applies to:
  • Microsoft Open Database Connectivity, versions 3.0, 3.5
  • The Microsoft Foundation Classes (MFC)
  • Microsoft Visual C++, 32-bit Enterprise Edition, versions 5.0, 6.0


SUMMARY

Xslatezp.exe is a self-extracting executable that performs data translations between Microsoft Access, FoxPro 3.0, SQL Server, and Excel.

This article demonstrates translation of data from one database format to another using Microsoft Foundation Class (MFC) ODBC. You use the JET engine as an interface to perform the data translations. Essentially, ODBC accesses data from a preexisting data store. This sample describes how to create this data store programmatically and dynamically, in a format different from the source using MFC ODBC and JET.


MORE INFORMATION

The following file is available for download from the Microsoft Download Center. Click the file name below to download the file:

Xslatezp.exe
Release Date: DEC-01-1998

For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.

Sample File Information



    File Name               Size
    -----------------------------------
    Xslate.dsp              4,032 bytes
    Xslate.dsw                535 bytes
    Xslate.plg                811 bytes
    Xslate.cpp              5,208 bytes
    Xslate.ncb             33,792 bytes
    Xslate.opt             53,760 bytes
    Readme.txt
 
The sample performs translations between Microsoft Access, Excel, FoxPro 3.0, SQL Server 6.5 data stores. It works as follows:
  1. Asks the user to enter the SQL Server name, Login ID and password.


  2. Generates the SQL Server data source name (DSN) 'XslateSQLDSN'.


  3. Creates the Microsoft Access database (Xslate.mdb) and the Microsoft Access DSN 'XslateAccessDSN'.


  4. Creates a Microsoft Access table 'XslateA' in 'Xslate.mdb' composed of three fields and inserts a 100 records. The fields are as follows:


  5. 
          Field Name    Data type
          -----------------------
    
          Field1        Counter
          Field2        Text
          Field3        Long 
  6. Exports this table to an Excel spreadsheet 'XslateX.xls' with the named range 'XslateX1', a FoxPro table 'XslateF.dbf', and a SQL Server table 'XslateS'.


  7. Translates the FoxPro table 'XslateF.dbf' to SQL Server 'XslateS1', the SQL Server table 'XslateS1' to Excel spreadsheet 'XslateX.xls' with named range 'XslateX2', and the Excel named range 'XslateX2' to a FoxPro table 'XslateF1.dbf'.


  8. This results in the following data stores:

    • SQL Server tables XslateS, XLateS1 in the SQL Server Pubs database.


    • FoxPro 3.0 tables XslateF.dbf, XslateF1.dbf in the current project directory.


    • Excel named ranges XslateX1, XslateX2 in the spreadsheet XslateX.xls created in the current project directory.


  9. Cleans the remnants of the application, namely, the Microsoft Access database, the Microsoft Access and SQL Server DSN's.


Additional query words:

Keywords : kbfile kbDatabase kbJET kbMDAC kbODBC
Version : WINDOWS:3.0,3.5,5.0,6.0; winnt:
Platform : WINDOWS winnt
Issue type : kbinfo


Last Reviewed: December 16, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.