急问:System.IndexOutOfRangeException: 索引超出了数组界限
最近需要从Oracle库中将大量(百万级)的数据用程序导入到mysql中
程序每次跑到一百万多一点就出现这样的异常,不知道如何解决.
主要代码很简单,请大家帮忙看看,如何解决,谢谢.
public void Oracle2Mysql()
{
GetConn();
GetMySqlConn();
OracleCommand cmd = conn.CreateCommand();
cmd.CommandText = "select s.email,s.createdate,s.iforder,s.updatedate from s_subscriber s ";
conn.Open();
mysqlconn.Open();
OracleDataAdapter oracleDAP = new OracleDataAdapter(cmd);
DataSet ds = new DataSet();
oracleDAP.Fill(ds, "table ");
conn.Close();
try
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
string EmailSupplier = GetEmailSupplier(dr[ "email "].ToString());
string EmailSupplierCode = GetEmailSupplierCode(EmailSupplier.ToString());
ArrayList para = new ArrayList();
para.Add(dr[ "email "].ToString());
para.Add(EmailSupplierCode.ToString());
&nb