Unable to load DLL oramts.dll - Oracle DB with Transcations

To use the Oracle Client with Transactions (TransactionScope) you must install: Oracle Services For MTS Client.Net_9207\Disk1 Start SETUP -> Oracle Services For MTS ... MTS = Microsoft Transaction Server Then you can use code like this with Oracle DBMS

using(System.Transactions.TransactionScope scope = new System.Transactions.TransactionScope())
{
    finally
   {
          if (conn != null)
          {
              conn.Close();
          }
   }
   scope.Complete();
}

Solution to: System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.

from an internet website: a datareader represents an open connection to the database. to run 2 readers simultaneously, you need to use two seperate connections. #1 just change your connection string to add it back (add MultipleActiveResultSets=True to connection string).http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=123691&SiteID=1 NO SOLUTION #2 new Connection on every GetConnection() --> no singleton NO SOLUTION ERROR: Invalid attempt to MetaData when reader is closed. #3 connectionstring always another! NO SOLUTION ERROR: Invalid attempt to MetaData when reader is closed. #4 BackgroundWorker solves the problem!

Flagsattribute - How to remove a flag from flaglist

Is in this documentation not so easy to find... But it works with the Bitwise XOR Assignment Operator! FontStyle fontStyle = this.textBox1.Font.Style; fontStyle = FontStyle.Italic FontStyle.Bold; fontStyle = fontStyle ^ FontStyle.Bold; //Removes the flag Bold from the fontStyle flagAttributes list http://msdn2.microsoft.com/de-de/library/system.flagsattribute(VS.80).aspx

Latest Posts

Popular Posts