Connecting to Informix using .NET

浪子不回头ぞ 提交于 2019-11-30 15:40:21

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.

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/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!