"Thread was being aborted" 0n large dataset
- by Donaldinio
I am trying to process 114,000 rows in a dataset (populated from an oracle database). I am hitting an error at around the 600 mark - "Thread was being aborted".
All I am doing is reading the dataset, and I still hit the issue. Is this too much data for a dataset? It seems to load into the dataset ok though. I welcome any better ways to process this amount of data.
rootTermsTable = entKw.GetRootKeywordsByCategory(catID);
for (int k = 0; k < rootTermsTable.Rows.Count; k++)
{
string keywordID = rootTermsTable.Rows[k]["IK_DBKEY"].ToString();
...
}
public DataTable GetKeywordsByCategory(string categoryID)
{
DbProviderFactory provider = DbProviderFactories.GetFactory(connectionProvider);
DbConnection con = provider.CreateConnection();
con.ConnectionString = connectionString;
DbCommand com = provider.CreateCommand();
com.Connection = con;
com.CommandText = string.Format("Select * From icm_keyword WHERE (IK_IC_DBKEY = {0})",categoryID);
com.CommandType = CommandType.Text;
DataSet ds = new DataSet();
DbDataAdapter ad = provider.CreateDataAdapter();
ad.SelectCommand = com;
con.Open();
ad.Fill(ds);
con.Close();
DataTable dt = new DataTable();
dt = ds.Tables[0];
return dt;
//return ds.Tables[0].DefaultView;
}