ODBC error 23101
Posted in 2020
Ramon Rey got ODBC error -23101 connecting from Windows 10 (CSDK 4.10.TC10) to Informix 12.10.FC10WE on Linux. Sheshnarayan Agrawal first suggested CLIENT_LOCALE en_US.CP1252 and the Use Server Database Locale option, which did not help. Ramon solved it by adding INFORMIXDIR as a system environment variable. Shesh agreed it is mandatory; Ramon suspected missing admin rights on his laptop caused the install to skip it.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ODBC / JDBC / .NET, Platform-Specific Issues, Internationalization & Character Sets
Greetings and salutations! I'm trying to setup an ODBC connection from my Windows 10 client to a Linux Informix DB Server. Having setup the appropriate server and host information in the Setnet32 app I'm getting an "Unspecified System Error = -23101" when trying to get the database list from the server (please see attached screenshot). I have changed the DB_LOCALE as per "SELECT site FROM systables WHERE tabid IN ( 90, 91 );" (en_US.819) and the CLIENT_LOCALE as per Window's "Get-WinSystemLocale" on PowerShell (en-US.1033) and nothing. Please help!!! Thanks in advance. Ramon PS my versions: Windows 10 Informix CSDK 4.10.TC10 (32-bit) Informix Server 12.10.FC10WE on Linux. ------------------------------ Ramon Rey ------------------------------ #Informix
Hi Ramon, Kindly set CLIENT_LOCALE to en_US.CP1252. This should resolve -23101 error. Thanks -Shesh ------------------------------ Sheshnarayan Agrawal ------------------------------
Hello Shesh, Thanks for the reply... unfortunately, it didn't work. R ------------------------------ Ramon Rey ------------------------------
Hi Ramon, Error -23101 is usually caused by mismatch of CLIENT and DB LOCALEs. Could you please try creating the DSN? This will help isolate the issue to be in the "Environment" or generic! Specially pay attention to "Environment" tab while creating the DSN. In the "Environment" tab, ensure to check the "Use Server Database Locale" box. Thanks -Shesh ------------------------------ Sheshnarayan Agrawal ------------------------------
Hello Shesh, I've gone to the ODBC Data Source Administration in Windows to create the DSN. I've done so, with the " Use Server Database Locale" box checked. Now I get this error (please see attached screenshot). Thank you so much for your help! R ------------------------------ Ramon Rey ------------------------------
Also Shesh... when I click "apply and test connector" I get this other error! (please see attached screenshot). Once more, thanks for your help! R ------------------------------ Ramon Rey ------------------------------
I did find and solve the issue!!! I needed to add INFORMIXDIR as a system environment variable!: - Close all setnet32 and Connect Test Demo. - Look for "edit the system environment variables". You'll need to be an admin or have an admin acct and password to do so. This will bring up the system properties window. - Click on the "Environment Variables" - Under the System Variables pane, look for INFORMIXDIR. if present make sure it points to the correct location for your CSDK installation (E.G. C:\\Program Files (x86)\\Informix Client-SDK). If not present, click on new (again, under the system variables pane) and enter "INFORMIXDIR" for the variable name and the correct path to your installation of your CSDK (again E.G.C:\\Program Files (x86)\\Informix Client-SDK). - Click OK where pertinent. - Open the Connect Test Demo and enter the appropriate entries. choose a table with a small amount of rows for the test. - Voila! I'm not sure if adding the INFORMIXDIR environment variable as a user variable would have done the trick. I'd probably try later. Thank you so much . Your suggestion to look on the environment helped me expand my troubleshooting. Cheers! Ramon ------------------------------ Ramon Rey ------------------------------
Great Ramon, You resolved the issue, Yes INFORMIXDIR is mandatory to be set (beside other few variables). Infact, CSDK installation should take care of setting up INFORMIXDIR in Setnet32/registry on Windows! Looks like it didn't happen in this case! Thanks -Shesh ------------------------------ Sheshnarayan Agrawal ------------------------------
Agreed. And should have happened in a PC/laptop on which the login user has admin rights. In my case, my laptop is a corporate laptop on which I don't have admin rights, which I believe to be the culprit for this issue. Something to keep in mind. Thanks again ! Cheers! R ------------------------------ Ramon Rey ------------------------------