Wrong Application Executable and Linking Format (ELF)
It is important that the ODBC driver's executable and linking format (ELF) is the same as the application. In other words, a 32-bit driver is needed for use with a 32-bit application or a 64-bit driver for a 64-bit application.
If these do not match, it is possible to configure a DSN for a 32-bit driver and when an attempt is made to use that DSN in a 64-bit application, the DSN won't be found because the registry holds DSN information in different places depending on ELF (32-bit versus 64-bit).
Be sure to use the correct ODBC Administrator tool. On 32-bit and 64-bit Windows, the default ODBC Administrator tool is in c:\Windows\System32\odbcad32.exe. However, on a 64-bit Windows machine, the default is the 64-bit version. If the 32-bit ODBC Administrator tool is needed on a 64-bit Windows system, run the one found here: C:\Windows\SysWOW64\odbcad32.exe
Misspelling of DSN or Driver
This can happen because the data source name or driver name is invalid (such as with a typo in the data source name, in the odbc.ini or the connection string in the application)
Verify that the name of the ODBC data source in the connection string is identical to an existing ODBC data source.
DSN contains special character(s).
As per the ODBC Specification, a DSN should not contain the []{}(),;?*=!@ characters, and the value of the DSN keyword cannot consist only of blanks. Because of the registry grammar, keywords and data source names cannot contain the backslash (\) character.
Invalid or missing environment configuration
The environment may not be configured correctly (such as when the wrong odbc.ini file is being located or there is an error in the structure of the odbc.ini).
Follow the steps below to check the configuration.
1. For applications running on Windows
-
If application is running as a service on Windows ( eg: Microsoft Internet Information Server IIS ), create a SYSTEM (instead of a USER) ODBC data source name so that the data source is available for all users on the system.
-
When running on x64 windows machines, make sure to install and configure a 32-bit driver when using 32-bit applications, and a a 64-bit driver when using 64-bit applications.
The 32-bit version of the ODBC administrator tool (odbcad32.exe) file is located in the %systemdrive%\Windows\SysWoW64 folder.
The 64-bit version of the ODBC administrator tool (also named odbcad32.exe) file is located in the %systemdrive%\Windows\System32 folder.
2. For applications running on Unix/Linux:
-
Verify that the ODBCINI (or ODBC_INI or SHADOW_INI) environment variable points to the correct odbc.ini (or shadow.ini) file in which the ODBC data source is defined. For example:
export ODBCINI=/opt/odbc32v53/odbc.ini
-
Specify the fully qualified name inside odbc.ini file (path + filename)
-
Environment variable name (such as ODBCINI) must be in uppercase
-
Ensure that the file has read permissions for everyone
-
When launching an application through a batch file or shell script, ensure that the batch file/shell script does not reset the ODBCINI environment variable.
-
Verify that the odbc.ini file is valid.
-
Add the ODBC data source name between square brackets in odbc.ini file and make sure there is a line for the driver. Each option must be specified on its own line. For example:
[MYDATASOURCENAME]
Driver=/home/support/soft/odbc32v53/lib/ivdb223.so
otheroption=optionvalue
Ensure no extra spaces are present after the HostName, PortNumber or Password parameters in the ODBC data source.
Execute the following UNIX / Linux command to ensure that the line formatting in the odbc.ini is in UNIX style, not in Windows/DOS style.
dos2unix odbc.ini
NOTE: Use the tools example and demoodbc which ship with Connect and SequeLink software to test the ODBC connectivity outside of application.
3. For SequeLink users:
The source of the error may be the SequeLink ODBC client or the SequeLink Server.
-
When the error reads "[DataDirect][ODBC SequeLink driver][ODBC Socket][DataDirect][ODBC lib] Data source name not found and no default driver specified" the problem is with the SequeLink Server for ODBC Socket and/or ODBC driver configuration on the SequeLink Server
-
Verify that the ODBC connection used by the SequeLink Server for ODBC Socket is working fine. For example, use the tool 'example' which ships with the DataDirect Connect for ODBC drivers to ensure that no errors occur upon connection to ODBC data source.
-
When the ODBC connection used by the SequeLink Server for ODBC socket is successful using a test tool, verify that the SequeLink ODBC Socket Server service advanced data source variable DataSourceSOCODBCConnStr is pointing to the correct SYSTEM (not USER) ODBC data source name. For example:
DataSourceMSSODBCConnStr=DSN=datasource_name;
UID=user_name;
PWD=password
-
To use a DSN-less connection, ensure the case-sensitive value specified in the Driver= portion does not contain any spaces. For example:
DataSourceMSSODBCConnStr=Driver={DataDirect 5.3 dBASEFile (*.dbf)};Database=C:\mydata
4. If using third party ODBC drivers
-
On Windows: Refer to the third party ODBC driver documentation and contact the third party ODBC driver vendor for support.
If it is a Microsoft ODBC driver manager issue, contact Microsoft (
https://support.microsoft.com/en-us) for support.
-
On UNIX/Linux: Refer to the third party driver ODBC documentation and contact the third party ODBC driver vendor for support.
If it is a DataDirect driver manager issue, contact Progress Software for support as per
How to contact Progress DataDirect Technical support.