Informix

 View Only
  • 1.  ODBC error 23101

    Posted Tue November 03, 2020 03:26 PM
    Edited by System Fri January 20, 2023 04:43 PM

    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.

    Error Screenshot


    ------------------------------
    Ramon Rey
    ------------------------------
    #Informix


  • 2.  RE: ODBC error 23101

    Posted Wed November 04, 2020 01:03 AM
    Hi Ramon,

    Kindly set CLIENT_LOCALE to en_US.CP1252. This should resolve -23101 error.

    Thanks
    -Shesh

    ------------------------------
    Sheshnarayan Agrawal
    ------------------------------



  • 3.  RE: ODBC error 23101

    Posted Thu November 05, 2020 09:08 AM
    Hello Shesh,
    Thanks for the reply... unfortunately, it didn't work.
    R

    ------------------------------
    Ramon Rey
    ------------------------------



  • 4.  RE: ODBC error 23101

    Posted Thu November 05, 2020 10:27 AM
    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
    ------------------------------



  • 5.  RE: ODBC error 23101

    Posted Thu November 05, 2020 10:46 AM
    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
    ------------------------------



  • 6.  RE: ODBC error 23101

    Posted Thu November 05, 2020 10:51 AM
    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

    Unspecified system error 2


    ------------------------------
    Ramon Rey
    ------------------------------



  • 7.  RE: ODBC error 23101

    Posted Thu November 05, 2020 11:28 AM
    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 @Sheshnarayan Agrawal. Your suggestion to look on the environment helped me expand my troubleshooting.

    Cheers!

    Ramon

    ------------------------------
    Ramon Rey
    ------------------------------



  • 8.  RE: ODBC error 23101

    Posted Fri November 06, 2020 01:47 AM
    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
    ------------------------------



  • 9.  RE: ODBC error 23101

    Posted Fri November 06, 2020 09:12 AM
    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 @Sheshnarayan Agrawal! Cheers!

    R​

    ------------------------------
    Ramon Rey
    ------------------------------