Informix Error -11047: Dialog failed.
Cause and resolution
Dialog failed.
This Informix CLI error code is the same as SQLSTATE value IM008. The following function can return this error code: SQLDriverConnect().
Informix CLI could not display the SQL Data Sources dialog box or the login dialog box because the hwnd value is null and the fDriverCompletion value is not SQL_DRIVER_NO_PROMPT. Use different values for hwnd and fDriverCompletion.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11047 fires when SQLDriverConnect() can't display its data-sources or login dialog box —
per the official guidance, this is the same as SQLSTATE value IM008.
hwndbeing null whilefDriverCompletionisn'tSQL_DRIVER_NO_PROMPT, per the official guidance — the direct, only cause; a dialog can't be shown without a valid window handle.
Solutions / Resolution
- Use different values for
hwndandfDriverCompletion, per the official guidance — either supply a valid window handle, or setfDriverCompletiontoSQL_DRIVER_NO_PROMPT.
Examples
N/A
No specific triggering statement is documented beyond a null hwnd with prompting enabled.
Diagnostic Checks
- Check the
hwndargument's value, and confirm it's non-null wheneverfDriverCompletioncalls for a dialog to be shown.
Related Errors / Related Topics
- -11046 — "No data source or driver specified; dialog prohibited." A related connection-completion error, about prompting being explicitly disallowed rather than the dialog itself failing.
A connection dialog couldn't be displayed because hwnd was null while prompting was
requested — supply a valid window handle or disable prompting.