I have successfully installed Informix Client SDK and unixODBC in Linux. I tested the connection with isql and it can connect and do queries.
How I currently do the setup:
- SQLhost:
/opt/informix/etc/sqlhost
- odbc.ini:
/etc/unixODBC/odbc.ini
- odbcinst.ini:
/etc/unixODBC/odbcinst.ini
- Environment variables:
INFORMIXDIR
,INFORMIXSERVER
,INFORMIXSQLHOSTS
,ODBCINI
I run my Rust Program and having this error:
Error: ODBC emitted an error calling 'SQLConnect':
State: I000, Native error: -11041, Message: [unixODBC][
With a cut-off error message. I found an online PDF on ODBC-Informix guide stating that error:
-11041 refers to "Data source not found and no default driver specified"
My guess for this issue:
Wrong directory for odbc.ini & odbcinst.ini because I see some people use
/etc/odbc.ini
&/etc/odbcinst.ini
. But isql can run using DSN from/etc/unixODBC/odbc.ini
. I tried, output same error.Could it be unixODBC current version not compatible with the Informix version I'm using?
Probably from my Rust program? I'm using crate odbc-api. Reading the documentation, no need to include anything related to Linux. Just setup ODBC. This Rust program works perfectly in ODBC-Windows.
File permissions in Linux.
Has anyone encountered a similar situation? If so, could you please provide assistance or advice?