17-02-21 10:59 AM
I am using the below code.
message="";
dt = new DataTable();
isSuccess=true;
string connStr= Connection_String;
OleDbConnection conn = new OleDbConnection(connStr);
OleDbDataAdapter objAdapter = new OleDbDataAdapter();
try{
conn.Open();
OleDbCommand cmd = new OleDbCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.Text;
cmd.CommandText = Input_Query;
cmd.CommandTimeout=80000;
objAdapter.SelectCommand = cmd;
objAdapter.Fill(dt);
}
catch(Exception e)
{
isSuccess=false;
message+=e.Message+e.StackTrace;
}
finally{
conn.Close();
}
using the below connection string
Provider=Microsoft.ACE.OLEDB.12.0;Data Source= [FilePath] ;
Have any of you guys came across this type of issue. If yes, what should be done to avoid this issue.
18-02-21 02:06 AM