Attempted to read or write protected memory. This is often an indication that other memory is corrupt RRS feed

  • Question

  • I am getting this error when trying to open oracle connection from visual studio 2005.

    I am pasting the stack trace here.

    at System.Data.Common.UnsafeNativeMethods.OraMTSJoinTxn(OciEnlistContext pCtxt, IDtcTransaction pTrans)\r\n   at System.Data.OracleClient.TracedNativeMethods.OraMTSJoinTxn(OciEnlistContext pCtxt, IDtcTransaction pTrans)\r\n   at System.Data.OracleClient.OciEnlistContext.Join(OracleInternalConnection internalConnection, Transaction indigoTransaction)\r\n   at System.Data.OracleClient.OracleInternalConnection.Enlist(String userName, String password, String serverName, Transaction transaction, Boolean manualEnlistment)\r\n   at System.Data.OracleClient.OracleInternalConnection.Activate(Transaction transaction)\r\n   at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)\r\n   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)\r\n   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)\r\n   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)\r\n   at System.Data.OracleClient.OracleConnection.Open()\r\n   at MDM.Data.Dataaccess.ExecuteNonQuery(String query, CommandType commandtype, ConnectionState connectionstate)


    It throws the error when using oracle MTS.

    I am using oracle 9i client .

    Any help will be highly appreciated.

    Thanks in advance

    Monday, January 22, 2007 7:01 AM

All replies

  • Hi,

    We've tested with Orcacle to make sure Data-Driven testing works with Unit Tests.  It's not clear to me that you are doing Data-Driven or just making database calls from a unit test.

    Can you elaborate on the scenario more?  Detailed repro steps would be great.


    David Williamson

    Tuesday, January 23, 2007 10:28 PM
  • Hi,

    After re-reviewing your post, I'm not sure your issue has anything to do with VS Team System Test.  If you can provide more information about your scenario I can try to reroute you to a better forum.



    Wednesday, February 7, 2007 7:07 PM
  • I think this could help you http://support.microsoft.com/kb/926421

    It's a bug when you have Office 2007 and SSAS 2005 or RS 2005 in the same computer.

    Bye !
    Tuesday, May 22, 2007 6:27 PM
  • Hi,


    I am having the same error message when i try to call a DLL. I am using an interop DLL for Acrobat and here's the code written.


                        AcroExchApp = CreateObject("AcroExch.App")
                        AcroExchAVDoc = CreateObject("AcroExch.AVDoc")





    The error happened when the object try to call the Open method. This program is running fine in my development machine but the error occured when I try to run in my UAT machine.


    The differences for both machines are the UAT machine has been loaded with the local policies and joined the Domain whereas the development machine is a standalone win2k3 server.


    Could it be due to the local policies which prevent the objects calling?




    Monday, January 7, 2008 2:33 AM
  • hey,


    have you had any success with it? I have Acrobat opening on SOME users' machines, as well as on my development machine, but most users get this error message. They ALL get their .Net application istalled and updated from the same location on the network (that's where I publish it), same OS, same version of Acrobat 8 Pro with the same updates, so apparently something is different with they user accounts.


    I have been googling around for awhile now but cannot find any clue on this.




    Monday, February 18, 2008 7:11 PM
  • I got rid of this roughly 1 in 1000 attempts problem by switching .NET's System.Data.OracleClient to Oracle's Oracle.DataAccess. .NET works fine in application web pages but may get this error when used in Window's services.


    Good luck,


    Friday, June 27, 2008 1:15 PM
  • I doubt anybody is still listening to this, but ...

    One "Release" of Oracle - I think it was 9i, included a corrupt version of oramts.dll (apparently they had included a version with debuging code in the final release). A corrected version was available for download from Oracle's website.
    Friday, July 24, 2009 1:03 PM
  • Hi All,

    Even I was having the same error message when i was attempting to read .dbf files(Foxpro file extension).

    The same code which used to work in many of the machines gave me the exception on some of the client machines. After few investigation i found that those machines did not have foxpro compatible drivers or software installed.

    After I installed the same, the code worked fine.

    I hope my investigation will prove help full for you guys too..

    Thank You

    Shambu Sathyan

    Senior Programmer Analyst

    Tuesday, June 14, 2011 6:31 AM