Informix
ODBC
Informix 3.30:
"Dsn='';Driver={INFORMIX 3.30 32 BIT};Host=hostname;Server=myserver;Service=service-name;Protocol=olsoctcp;Database=mydb;UID=username;PWD=myPwd
Informix-CLI 2.5:
"Driver={Informix-CLI 2.5 (32 Bit)};Server=myserver;Database=mydb;Uid=username;Pwd=myPwd"
ODBC
Informix 3.30:
"Dsn='';Driver={INFORMIX 3.30 32 BIT};Host=hostname;Server=myserver;Service=service-name;Protocol=olsoctcp;Database=mydb;UID=username;PWD=myPwd
Informix-CLI 2.5:
"Driver={Informix-CLI 2.5 (32 Bit)};Server=myserver;Database=mydb;Uid=username;Pwd=myPwd"
http://expert.csdn.net/Expert/topic/1592/1592152.xml?temp=.3967707
DataSet ds = new DataSet();
OleDbConnection cnn = new OleDbConnection("provider=ifxoledb;DSN=bpcs_test;database=bpcs_test;user id=edflow;password=wolfde");
OleDbCommand cmd = new OleDbCommand();
OleDbDataAdapter adp = new OleDbDataAdapter();
cnn.Open();
cmd.Connection = cnn;
cmd.CommandText = "select * from avm where vendor='8'";
adp.SelectCommand = cmd;
adp.Fill(ds);
cnn.Close();
ulgrd.DataSource = ds;
ulgrd.DataBind();
在cnn.open报错:REGDB_E_CLASSNOTREG(0x80040154)
我的firebird数据库(也够非典型了吧)就只有在2003里能用odbc连上。2002.net本身没有odbc数据采集器。后来装了odbc.net 还是不爽。oldb里的的for odbc那个没用的。连通过odbc 连accsee 都连不上:( (不知是不是我的有问题)
DataTable tb=new DataTable();
OleDbConnection cnn = new OleDbConnection();
cnn.ConnectionString="Provider=DataDirect.Informix7OLEDBProvider.2;Password=wolfde;Persist Security Info=True;User ID=edflow;Data Source=bpcs_test;Initial Catalog=bpcs_test";
cnn.Open();
string strSql = "select * from fso where sord='69276'";
OleDbDataAdapter adp = new OleDbDataAdapter(strSql,cnn);
adp.Fill(tb);
cnn.Close();
以上程序能运行,但到adp.Fill(tb);时,很慢不能显示数据,是不是不能用datatable读informix的数据,
是不是从informix取不出数据,我试过可以执行update和insert的操作,但要执行select到
adp.Fill(tb);这句时就死了,也没有报错,占用cup还特别大,谁能解答这个问题?