Hello,
I have a situation where I need to do some updates to the database using the adapter using a transaction that was started via a vanilla ADO.Net call.
Is this code correct (added to derived DataAccessAdapter):
private System.Data.IDbTransaction _transaction = null;
public System.Data.IDbTransaction DatabaseTransaction
{
get { return _transaction; }
set { value = _transaction; }
}
protected override System.Data.IDbTransaction CreateNewPhysicalTransaction()
{
if (DatabaseTransaction == null)
{
return base.CreateNewPhysicalTransaction();
}
else
{
return _transaction;
}
}
Do I need to do this for DBConnection as well?
Also, if I wanted to do the reverse, make an ADO.Net call using a transaction started by the adapter, how would I go about it?
Thanks,
Phil
(Edit: version 2.0, latest version of everything, adapter vs. SQL 2005)