none
TransactionScope - Unable to load DLL 'oramts.dll'

    Question

  •  

    Environement: Oracle vers 10g db.
    I get following error when using TransactionScope. Without it, runs ok. It fails at cn.Open().

      "Unable to load DLL 'oramts.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

    oramts.dll exists in the Oracle\Orahome2\bin directory.

    What causes this problem and how can it be fixed?

     

    using System.Transactions;

     

    public static bool Insert()
     {
       using (TransactionScope scope = new TransactionScope())
        {  
           bool success =   DeleteEmployee();
           success =  InsertEmployee(record);
         } 
          scope.Complete();
          return success;

     }
     


        public override bool DeleteEmployee()
        {
          using (OracleConnection cn = new OracleConnection(ConnectionString))
          {
            OracleCommand cmd = new OracleCommand("DeleteEmployee", cn);
            cmd.CommandType = CommandType.StoredProcedure;
            cn.Open();
            int ret = ExecuteNonQuery(cmd);
            return (ret == 1);
          }
        }

    Wednesday, June 25, 2008 11:22 PM

Answers

All replies