Connecting to Informix using .NET

后端 未结 2 1349
[愿得一人]
[愿得一人] 2021-01-03 07:20

Server Information
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
Server: Informix Dynamic Server Version 7.31.UD3

相关标签:
2条回答
  • 2021-01-03 07:54
    public void MakeConnection() {
        string ConnectionString = "Host=" + HOST + "; " +
         "Service=" + SERVICENUM + "; " +
         "Server=" + SERVER + "; " +
         "Database=" + DATABASE + "; " +
         "User Id=" + USER + "; " +
         "Password=" + PASSWORD + "; ";
    
        IfxConnection conn = new IfxConnection();
        conn.ConnectionString = ConnectionString;
        try {
            conn.Open();
            Console.WriteLine("Made connection!");
            Console.ReadLine();
        } catch (IfxException ex) {
            Console.WriteLine("Problem with connection attempt: "
                              + ex.Message);
        }
    }
    

    See: http://www.ibm.com/developerworks/data/library/techarticle/dm-0510durity/

    0 讨论(0)
  • 2021-01-03 08:09

    All it took was a fresh reinstall... removed all the old drivers and installed a fresh new 3.5 CSDK, then used the demo code from the article and used the Setnet32 to configure my connection.

    0 讨论(0)
提交回复
热议问题