Hello;
I am have written a few lines of programming code that returned data from a SQLBase database. This code has been running successfully without fail up until yesterday afternoon. No changes has been done to it, but the program now crashes with an Time Out Error on the OleDBDataAdaptor.fill method. The data returned for the SQL query is only 2rows and 10Columns. I am quite baffled as to what may have caused this.
protected IList<T> GenericGetAll<T>(string sql, string key, ObjectGenerator<T> generator)
{
OleDbCommand command = new OleDbCommand(sql, conn);//, trans);
//command.Parameters.Add(new OleDbParameter("bor_bar_no", key));
DataTable table = ExecuteDataTable(command,key);
List<T> entities = new List<T>();
//foreach (DataRow row in table.Rows)
foreach(DataRow row in table.rows)
{
entities.Add(generator(row));
}
return entities;
protected DataTable ExecuteDataTable(OleDbCommand command, string key)
{
DataTable dataTable = new DataTable();
para = new OleDbParameter();
para.Value = key;
command.Parameters.Add(para);
OleDbDataAdapter oleDbDA = new OleDbDataAdapter(command);
oleDbDA.Fill(dataTable);
return dataTable;
}