Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
QuestionSmartNavigation Pin
minniemooo30-Jun-09 22:59
minniemooo30-Jun-09 22:59 
AnswerRe: SmartNavigation Pin
dan!sh 30-Jun-09 23:04
professional dan!sh 30-Jun-09 23:04 
QuestionAForge.net writer.Open problem Pin
tvbarnard30-Jun-09 22:47
tvbarnard30-Jun-09 22:47 
QuestionRe: AForge.net writer.Open problem Pin
Eddy Vluggen30-Jun-09 23:18
professionalEddy Vluggen30-Jun-09 23:18 
Questionhow to change the File summary information Pin
Joe Rozario30-Jun-09 22:36
Joe Rozario30-Jun-09 22:36 
AnswerRe: how to change the File summary information Pin
dan!sh 30-Jun-09 23:01
professional dan!sh 30-Jun-09 23:01 
GeneralRe: how to change the File summary information Pin
Joe Rozario1-Jul-09 1:35
Joe Rozario1-Jul-09 1:35 
Question"Cannot access a disposed object.\r\nObject name: 'Transaction'." Pin
devvvy30-Jun-09 22:04
devvvy30-Jun-09 22:04 
hello

I ran into this error message while before/while/after insert into ShopMessage...

<br />
   		Message	"Cannot access a disposed object.\r\nObject name: 'Transaction'."	string<br />


I'm using TransactionScope with timeout set to zero (i.e. infinite). Googled a bit still quite clueless.

This is how I wrap Database calls in TransactionScope
<br />
<br />
					using (oScope = new TransactionScope(TransactionScopeOption.Required, TimeSpan.FromMilliseconds(0)))<br />
					{<br />
                                                // Here we have some ADO.NET calls + some NHibernate calls.<br />
						nGeneratedId = SaveCoreOperations(ref oShop);<br />
						oScope.Complete();<br />
					}<br />


Here's the stack trace
<br />
   at System.Transactions.Transaction.get_IsolationLevel()<br />
   at System.Data.SqlClient.SqlDelegatedTransaction..ctor(SqlInternalConnection connection, Transaction tx)<br />
   at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)<br />
   at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)<br />
   at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)<br />
   at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)<br />
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)<br />
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)<br />
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)<br />
   at System.Data.SqlClient.SqlConnection.Open()<br />
   at NHibernate.Connection.DriverConnectionProvider.GetConnection()<br />
   at NHibernate.Impl.SessionFactoryImpl.OpenConnection()<br />


Any idea?

dev

AnswerRe: "Cannot access a disposed object.\r\nObject name: 'Transaction'." Pin
Manas Bhardwaj30-Jun-09 22:13
professionalManas Bhardwaj30-Jun-09 22:13 
GeneralRe: "Cannot access a disposed object.\r\nObject name: 'Transaction'." Pin
devvvy1-Jul-09 1:14
devvvy1-Jul-09 1:14 
AnswerRe: "Cannot access a disposed object.\r\nObject name: 'Transaction'." Pin
Manas Bhardwaj1-Jul-09 1:41
professionalManas Bhardwaj1-Jul-09 1:41 
GeneralRe: "Cannot access a disposed object.\r\nObject name: 'Transaction'." Pin
devvvy1-Jul-09 1:41
devvvy1-Jul-09 1:41 
GeneralRe: "Cannot access a disposed object.\r\nObject name: 'Transaction'." Pin
Manas Bhardwaj1-Jul-09 1:46
professionalManas Bhardwaj1-Jul-09 1:46 
GeneralRe: "Cannot access a disposed object.\r\nObject name: 'Transaction'." Pin
devvvy1-Jul-09 1:49
devvvy1-Jul-09 1:49 
AnswerRe: "Cannot access a disposed object.\r\nObject name: 'Transaction'." [modified] Pin
RussVB25-Aug-09 16:38
RussVB25-Aug-09 16:38 
QuestionCancel Events Pin
satsumatable30-Jun-09 21:56
satsumatable30-Jun-09 21:56 
AnswerRe: Cancel Events Pin
DaveyM6930-Jun-09 22:06
professionalDaveyM6930-Jun-09 22:06 
GeneralRe: Cancel Events Pin
satsumatable30-Jun-09 22:34
satsumatable30-Jun-09 22:34 
GeneralRe: Cancel Events Pin
Cracked-Down30-Jun-09 22:58
Cracked-Down30-Jun-09 22:58 
QuestionRe: Cancel Events Pin
musefan1-Jul-09 1:21
musefan1-Jul-09 1:21 
QuestionHow to attach file when sending emails Pin
dabuskol30-Jun-09 21:54
dabuskol30-Jun-09 21:54 
AnswerRe: How to attach file when sending emails Pin
Manas Bhardwaj30-Jun-09 21:58
professionalManas Bhardwaj30-Jun-09 21:58 
QuestionHow to close the form using Alt+f4? Pin
swetha_insoft30-Jun-09 21:37
swetha_insoft30-Jun-09 21:37 
AnswerRe: How to close the form using Alt+f4? Pin
SeMartens30-Jun-09 21:41
SeMartens30-Jun-09 21:41 
AnswerRe: How to close the form using Alt+f4? Pin
stancrm30-Jun-09 21:41
stancrm30-Jun-09 21:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.