本文共 1953 字,大约阅读时间需要 6 分钟。
// ODBC DSN -- INFORMIX 3.30 ODBC Driver using System.Data.Odbc; OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = "Dsn=DsnName;" + "Host=HostName;" + "Server=ServerName;" + "Service=ServerName;" + "Protocol=olsoctcp;" + "Database=DataBaseName;" + "Uid=UserName;" + "Pwd=Secret;"; conn.Open();
// ODBC without DSN -- INFORMIX 3.30 ODBC Driver using System.Data.Odbc; OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = "Dsn="";" + "Driver={INFORMIX 3.30 32 BIT};" + "Host=HostName;" + "Server=ServerName;" + "Service=ServerName;" + "Protocol=olsoctcp;" + "Database=DataBaseName;" + "Uid=UserName;" + "Pwd=Secret;"; conn.Open();
// ODBC Informix-CLI 2.5 ODBC Driver using System.Data.Odbc; OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = "Driver={Informix-CLI 2.5 (32 Bit)};" + "Server=ServerName;" + "DataBase=DataBaseName;" + "Uid=UserName;" + "Pwd=Secret;"; conn.Open();
// OleDb -- IBM Informix OleDb Provider using System.Data.OleDb; OleDbConnection conn = new OleDbConnection(); conn.ConnectionString = "Driver=IFXOLEDBC;" + "Data Source=DataBaseName@ServerName;" + "User id=UserName;" + "Password=Secret;"; "Persist Security Info=true;"; conn.Open();
转载地址:http://motqj.baihongyu.com/