About ODBC data sources in Switch

Guidelines

Please take into account the following guidelines when accessing ODBC data sources in Switch:

Before you set up the connection to the data source, you should have defined your database (i.e. the Database Source Name (DSN)) in the DSN settings of your operating system. Read the documentation of your database to learn how to set up the DSN.

Windows users can find more information on the Microsoft website: http://msdn.microsoft.com/en-us/library/ms710252%28v=VS.85%29.aspx

Mac users should install an ODBC Administrator, for example http://www.odbcmanager.net/, to be able to set up ODBC connections on Mac.

Note: Switch allows you to use both User and System DSN on Windows and Mac platforms.
Make sure to install a 32 bit ODBC driver.

Even while running Switch on a 64 bit operating system, only 32 bit ODBC drivers can be used, as Switch is currently a 32 bit process.

  • Example Windows OS: In case of MySQL database, the ODBC driver installer mysql-connector-odbc-5.1.8-winx64.msi is used. When you launch this installer and choose the Custom installation, you will see that two drivers are available: 32 bit and 64 bit. Install the 32 bit driver and preferably disable the 64 bit driver, to avoid mix-up of driver versions in the future. This will guarantee that Switch uses the correct driver.

For more information on ODBC drivers and data sources, refer to http://msdn.microsoft.com/en-us/library/ms710285%28v=VS.85%29.aspx .

Make sure to use the 32 bit version of the ODBC Administrator tool to configure your data sources (DSNs).
On 64 bit Windows computers, two ODBC Administrator tools are available:
  • 32 bit version: ..\windows\sysWOW64\odbcad32.exe
  • 64 bit version: ..\windows\system32\odbcad32.exe
Use the 32 bit version from \windows\sysWOW64\odbcad32.exe to configure your DSNs for Switch.
  • If you install only the 32 bit ODBC driver and then launch the 64 bit version of the tool, you will not be able to configure any DSNs, because the 64 bit version of the tool does not show the 32 bit ODBC drivers.
  • If you have installed the 64 bit ODBC drivers, then in the 64 bit version of the tool you will see the 64 bit driver and you will be able to configure DSNs for that driver. However, Switch will not work with these DSNs and you will get the error message The specified DSN contains an architecture mismatch between the Driver and Application".
    Note: The ODBC Administrator tool invoked from the Control Panel on Windows 64 bit OS is a 64 bit tool. Do not use this tool to configure DSNs for Switch.
For more information on managing data sources, refer to http://msdn.microsoft.com/en-us/library/ms712362%28v=VS.85%29.aspx .

Using the INGRES database in combination with Switch?

You should set the following flag (in the INGRES database):

return NULL for SCHEMA columns in ODBC catalog function result sets 

Otherwise, you will get an error ("invalid table") when setting up SQL statements.