# Installing the McObject ODBC Driver on Windows x64 systems

> On a Windows x64 system either the x64 or x32 ODBC driver can be installed, depending on whether the application using the driver will be x64 or x32. The next sections detail the installation steps for first x64 then x32 drivers.

> ### Step 1. Prerequisites

> To facilitate the installation process it is recommended to setup or verify the following:

> - Check that the redistribution pack for the current version and platform (x32 or x64) of Visual Studio is installed. (Install it if necessary.)
> - Create a desktop shortcut for file `c:\Windows\System32\odbcad32.exe` with name `odbcad32_x64`. (This is the ODBC administration utility for x64 drivers.)
> - Create a desktop shortcut for file `c:\Windows\SysWOW64\odbcad32.exe` with name `odbcad32_x32`. (This is the ODBC administration utility for x32 drivers.)
> - Create a desktop shortcut for file `c:\Windows\System32\cmd.exe` with name `cmd`. (This is an easy launch point for a Windows command line console window.)

> Now you are ready to proceed with the installation steps below for either the x64 or x32 ODBC driver.

## x64 driver installation

> If you wish to remove any DSN records from previous installations, you can do this before uninstalling the ODBC driver itself by clicking on the desktop shortcut for `odbcad32_x64` and/or `odbcad32_x32`. Then on tabs User DSN and System DSN click Remove for the desired DSN records. However, if you are just reinstalling the driver it is usually not necessary to remove DSN records because the Windows ODBC administration utility actually invokes the McObject setup library to delete or create new DSN records.

> ### Step 2. Uninstall the eXtremeDB ODBC x64 driver

> This must be performed as a cleanup step before the new installation.

> - Using the right button click, select menu item Run as and select user Administrator to open the `cmd` console shortcut with administrator privileges.
> - Change directory to 'odbc\bin' of the eXtremeDB installation.
> - Run 'c:\Windows\System32\regsvr32.exe /u .\McoOdbcSetup64.dll'. (An error message may occur if the ODBC driver was not installed previously or was already uninstalled.)
> - In Windows Explorer, open directory `c:\Windows\System32` and delete the following files if they appear there:

> >         McoOdbc.dll
> >         McoOdbcSetup64.dll
> >         McoSetupDlg.dll

> - Run the desktop shortcut `odbcad32_x64`; go to tab Drivers. Check that the eXtremeDB ODBC x32 driver is not in the list.

> ### Step 3. Install the x64 ODBC driver

> To install the new x64 ODBC driver:

> - Using the right button click, select menu item Run as and select user Administrator to open the `cmd` console shortcut with administrator privileges.
> - Change directory to `odbc\bin` of eXtremeDB installation.
> - Run `c:\Windows\System32\regsvr32.exe .\McoOdbcSetup64.dll`.
> - Open file `McoOdbcSetup.log` and check that there are no error messages.
> - In Windows Explorer, open directory `c:\Windows\System32` and check that the following files exist:

> >         McoOdbc.dll
> >         McoOdbcSetup64.dll
> >         McoSetupDlg.dll

> - Run the desktop shortcut `odbcad32_x64`; go to tab Drivers. Check that the eXtremeDB ODBC x64 driver is in the list. On tabs User DSN and System DSN check that the data source `xsql64_dsn` is created by default.

> ### Step 4. Create the new data source

> (The eXtremeDB ODBC x64 driver is already present in the list on tab Drivers of utility `odbcad32_x64`.)

> Run the desktop shortcut `odbcad32_x64`; go to tab User DSN. Use button Add; double-click on the eXtremeDB ODBC driver. This will bring up the McObject ODBC Setup dialog. Here you can set up ODBC access for a local or a remote database (see section eXtremeDB DSN configuration below). In the same way, create a new data source on tab System DSN.

## x32 driver installation

> If you wish to remove any DSN records from previous installations, you can do this before uninstalling the ODBC driver itself by clicking on the desktop shortcut for `odbcad32_x64` and/or `odbcad32_x32`. Then on tabs User DSN and System DSN click Remove for the desired DSN records. However, if you are just reinstalling the driver it is usually not necessary to remove DSN records because the Windows ODBC administration utility actually invokes the McObject setup library to delete or create new DSN records.

> ### Step 2. Uninstall the eXtremeDB ODBC x32 driver

> This must be performed as a cleanup step before the new installation.

> - Using the right button click, select menu item Run as and select user Administrator to open the `cmd` console shortcut with administrator privileges.
> - Change directory to `odbc\bin` of the eXtremeDB installation.
> - Run `c:\Windows\SysWOW64\regsvr32.exe /u .\McoOdbcSetup.dll`. (An error message may occur if the ODBC driver was not installed previously or was already uninstalled.)
> - In Windows Explorer, open directory `c:\Windows\SystemWOW64` and delete the following files if they appear there:

> >         McoOdbc.dll
> >         McoOdbcSetup64.dll
> >         McoSetupDlg.dll

> - Run the desktop shortcut `odbcad32_x32`; go to tab Drivers. Check that the eXtremeDB ODBC x32 driver is not in the list.

> ### Step 3. Install the x32 ODBC driver

> To install the new x32 ODBC driver:

> - Using the right button click, select menu item Run as and select user Administrator to open the `cmd` console shortcut with administrator privileges.
> - Change directory to `odbc\bin` of the eXtremeDB installation.
> - Run `c:\Windows\SysWOW64\regsvr32.exe .\McoOdbcSetup.dll`.
> - Open file `McoOdbcSetup.log` and check that there are no error messages.
> - In Windows Explorer, open directory `c:\Windows\SysWOW64` and check that the following files exist:

> >         McoOdbc.dll
> >         McoOdbcSetup.dll
> >         McoSetupDlg.dll

> - Run the desktop shortcut `odbcad32_x32`; go to tab Drivers. Check that the eXtremeDB ODBC x32 driver is in the list. On tabs User DSN and System DSN check that the data source `xsql_dsn` is created by default.

> ### Step 4. Create the new data source

> (The eXtremeDB ODBC x32 driver is already present in the list on tab Drivers of utility `odbcad32_x32`.)

> Run the desktop shortcut `odbcad32`; go to tab User DSN. Use button Add; double-click on the eXtremeDB ODBC driver. This will bring up the McObject ODBC Setup dialog. Here you can set up ODBC access for a local or a remote database (see ODBC DSN configuration for instructions). In the same way, create a new data source on the tab System DSN.