Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2013
    Posts
    6

    Unanswered: Informix ODBC "Must close current database before using a new database."

    I am trying to setup a Data Source from Windows 7 to a Linux base Informix SE (7.32.UC4) Database.

    I am using the 32-bit version of ODBC Data Source Administrator (...\SysWOW64\odbcad32.exe).

    I constantly get "Must close current database before using a new database." when I test the connection.

    I have edited ../informix/etc/sqlhosts, /etc/services and am using the correct port. The available databases appear in the dropdown list, so I am connecting to the remote server fine. However, they do each appear twice!

    I get the stated error message if I select a listed DB, or even if I type a name that does not exist (for testing purposes).

    Ideas?

  2. #2
    Join Date
    Oct 2013
    Posts
    1

    Informix ODBC "Must close current database before using a new database."

    Were you able to figure this out? I'm having the same issue.

  3. #3
    Join Date
    Oct 2013
    Posts
    6
    Unfortunately, no.

  4. #4
    Join Date
    Oct 2013
    Posts
    6
    Set up an XP virtual machine top attempt this, just to check if it was a Win7 or 64 bit issue. Same result.

    Which leaves this as either a client driver issue or a server side issue. I am leaning towards a client side issue.

    Client Driver: 3.50.TC9 aka v3.5.00.14586

    Might see if I can get an older one.

  5. #5
    Join Date
    Sep 2004
    Posts
    51

    Informix ODBC

    With SE you need to use the full path to the database. On linux if the database is in /informix/db, then on windows then you need to use:
    //informix/db/dbname.

    I have not done this in a while, so try either use / or //.

    HTH

  6. #6
    Join Date
    Oct 2013
    Posts
    6
    If you mean that for a database at /u/abc/db.dbs, I would use /u/abc/db, then I get the same error.

    /u/abc/db = Must close current database...
    /u/abc/db.dbs = Invalid database or cursor name format (doesn't like the period)

  7. #7
    Join Date
    Oct 2013
    Posts
    1

    Some additional info

    Hi everyone,

    using driver version 3.70 and 4.10, 32-bit and 64-bit.
    (Win7 32-bit, Win 8 64-bit, Server 2008R2 64-bit)

    I'm having this issue when trying to bind a source in Access.
    ODBC connection testing also returns an error.

    It seems it is working fine when you connect to the server without an initial database, and then select one via DATABASE command.
    (Sadly you can't do this with Windows ODBC sources)

    I 'sort of verified' this by following C# snippet using the .NET lib from SDK:

    Code:
    InformixConnectionManager ncm = new InformixConnectionManager("HOST", "SERVICE", "SERVER", "", "USR", "PW");
    IfxConnection ifxCon = ncm.getConnection();
    ifxCon.Open();
    
    IfxCommand ifxCmd = ifxCon.CreateCommand();
    ifxCmd.CommandType = System.Data.CommandType.Text;
    ifxCmd.CommandText = "DATABASE '/PATHTO/DB'";
    ifxCmd.ExecuteNonQuery();
    And then going on with my statements.
    Maybe this will help some of you or other people facing this issue.

  8. #8
    Join Date
    Sep 2004
    Posts
    51

    Informix ODBC

    First, make sure the sqlexecd deamon program is running.

    Second, use the path to the database, not the database itself.

    Should be /u/abc/. may need to use //u/abc/

    Third, make sure the host name and IP address are in the /etc/hosts file

    HTH

  9. #9
    Join Date
    Oct 2013
    Posts
    6
    Still cannot solve this. It looks as though it gets 2 connections...or the database name is ambiguous due to be doubled up.

  10. #10
    Join Date
    Sep 2004
    Posts
    51
    Not sure what you mean, can you tell me what application you are using. There are applications that will only work with dynamic type servers.

  11. #11
    Join Date
    Oct 2013
    Posts
    6
    I am just using the 32-bit Data Source Administrator in Windows 7.

  12. #12
    Join Date
    Sep 2004
    Posts
    51
    I reread the notes, I am not sure what would cause the database name to appear twice there are two versions of SE installed. Can you post an image of what you are seeing in odbc administrater.

    I found another issue that stated the same thing with the path. This should work.

    Also is there only one server connected to this machine?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •