Informix Error -11041: Data source name not found and no default driver specified.
Cause and resolution
Data source name not found and no default driver specified.
This Informix CLI error code is the same as SQLSTATE value IM002. The following functions can return this error code: SQLBrowseConnect(), SQLConnect(), and SQLDriverConnect().
One of the following problems occurred: (1) The function cannot find the initialization file, or (2) The data source that the szConnStrn string specified does not exist in the initialization file, and a default driver specification does not exist. Make sure that the initialization file exists. Add the specified data source to the initialization file or create a default driver specification.
The data source name specified in the connection request is not found in the ODBC.INI file or registry, and there is no default driver specification. Confirm that the data source name is registered. You can also provide a default data source.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11041 fires during connect when the named data source can't be resolved — per the official
guidance, this is the same as SQLSTATE value IM002, returnable by SQLBrowseConnect(),
SQLConnect(), and SQLDriverConnect().
- The initialization file can't be found, per the official guidance — the first named case.
- The data source named in
szConnStrndoesn't exist in the initialization file, and no default driver is specified, per the official guidance — the second named case.
Solutions / Resolution
- Confirm the initialization file exists, per the official guidance.
- Add the specified data source to the initialization file, or create a default driver specification, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a missing initialization file or data source entry.
Diagnostic Checks
- Check that the CLI initialization file exists and is readable, and that it lists the data source being connected to (or a default driver).
Related Errors / Related Topics
No closely related error codes are cross-referenced for -11041 in this set yet.
The data source couldn't be found in the initialization file, and no default driver exists — check the initialization file's contents.