Hi
Selfservicing, I have understood that makes me a lower life-form. But Being 250 tables and 6 years into the project I am disinclined to change to adapter unless somebody gives me a very good reason too.
I tried searching the forums. It came up with MANY threads but I found none that discussed using the HelperClasses.Transaction in SqlClient.
Am I vague in what it is I am after?
The below would roughly describe what I would like to achieve:
public static DataTable getDataTableFromSQLWithLLBLGenTxn(string sSQL, sevenG.BusinessLogic.HelperClasses.Transaction dbtxn)
{
DataTable dt = new DataTable();
try
{
SqlDataAdapter da = new SqlDataAdapter(sSQL, new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["Main.ConnectionString"].ToString()));
da.SelectCommand.Transaction = dbtxn.PhysicalTransaction;
da.SelectCommand.CommandTimeout = 600;
da.Fill(dt);
da = null;
return dt;
}
catch
{
return null;
}
}
The line:
da.SelectCommand.Transaction = dbtxn.PhysicalTransaction;
Obviously doesn't work but I put it there to make it clear what my aim is.
regards,
!Rob