下面代码能实现把数组 WELL_ID,REF_WELL_ID 插入到 td_bas_well 表中,
请问各位,怎样以同样的方式实现更新呢?
网上说可以执行更新,但是我试了很多次都失败了,
这是网址:
http://blog.csdn.net/hawksoft/article/details/7528384
string[] WELL_ID = new string[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" };
string[] REF_WELL_ID = new string[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" };
OracleCommand theCmmd = new OracleCommand("insert into td_bas_well (WELL_ID,REF_WELL_ID) values(:WELL_ID,:REF_WELL_ID)", ConnPool.GetTargetConn().Conn);
theCmmd.ArrayBindCount = WELL_ID.Length;//关键点
theCmmd.Parameters.Add(new OracleParameter("WELL_ID", OracleDbType.Varchar2, WELL_ID, System.Data.ParameterDirection.Input));
theCmmd.Parameters.Add(new OracleParameter("REF_WELL_ID", OracleDbType.Varchar2, REF_WELL_ID, System.Data.ParameterDirection.Input));
int count = theCmmd.ExecuteNonQuery();