title: Could not load type 'ADODB._Recordset_Deprecated' from assembly 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
body: <p>Look, im facing aproblem, it started to give me some headache because im looking and looking and still not luck.</p>
  
  <p>I have to execute a method of a DLL from C#, this DLL was created like  4 years ago in VB 6.0 and it is registered in COM. It uses ADOB.Recordset as returning type of the method that I have to execute (no source code avaialble :S)</p>
  
  <p>I've been searching how to load and execute that DLL. </p>
  
  <p>I was having problems first loading it, I couldn't load it with <code>Server.CreateObject, Assembly.Load, Assembly.LoadFrom</code> so I tried to add it from references of the COM and the visual Studio Imported it in the Bin Folder with the name Interops.[Name of Dll] </p>
  
  <p>When Y try to use it, it gives me compile error it says:</p>
  
  <pre><code>Error   1   No overload for method 'SelArregloCobertura' takes '6' arguments
  </code></pre>
  
  <p>The parameters are correct, within its type and everything. Pretty sure of this</p>
  
  <p>So I tried to execute it with Reflection this is the code :</p>
  
  <pre><code> ADODB.Recordset rs = new ADODB.Recordset();       
          string strRamo = "70";
          string strSubramo = "01";
          string strOficina = "070";
          int iClaveSolicitud = 7118;
          string strModulo = "0";
          int iInciso = 1;
  
          Poliza.clsdNTCoberturaClass oClass = new Poliza.clsdNTCoberturaClass();
  
          MethodInfo miSelArregloCobertura = oClass.GetType().GetMethod("SelArregloCobertura");
          miSelArregloCobertura.Invoke(oClass, new object[] { "70", "01", "070", 7118, "0", 1 });
          //oClass.SelArregloCobertura(strRamo, strSubramo, strOficina, iClaveSolicitud, strModulo, iInciso);
  </code></pre>
  
  <p>(I commented up the line that gives me the compile error)
  And the error is different, is not that compile error it gives me the error in the question</p>
  
  <pre><code>Could not load type 'ADODB._Recordset_Deprecated' from assembly 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
  </code></pre>
  
  <p>When I go to the metadata of the dll it seems like this.</p>
  
  <pre><code> [Guid("757AC98D-3800-406F-BA47-AEDAF2EBBCDB")]
      [TypeLibType(2)]
      [ClassInterface(0)]
      public class clsdNTCoberturaClass : _clsdNTCobertura, clsdNTCobertura
      {
          public clsdNTCoberturaClass();
  
          [DispId(1610809344)]
          public virtual ADODB._Recordset_Deprecated SelArregloARenovar(string dFecha1, string dFecha2, string strNumOfic, short strCveAge, string strRamo);
          [DispId(1610809347)]
          public virtual ADODB._Recordset_Deprecated SelArregloCobertura(string strRamo, string strSubRamo, string strNumOfic, int lCveSol, string strModulSol, int lCveInc);
          [DispId(1610809348)]
          public virtual ADODB._Recordset_Deprecated SelArregloCobEst(string strRamo, string strSubRamo, short intCveInc, short intAnio, int lNumRec, string strOficRecl);
          [DispId(1610809349)]
          public virtual ADODB._Recordset_Deprecated SelArregloCobEstim(string strRamo, string strSubRamo, short intCveInc, short intAnio, int lNumRec, string strOficRecl);
          [DispId(1610809346)]
          public virtual ADODB._Recordset_Deprecated SelArregloNvaCobertura(string strRamo, string strSubRamo, string strNumOfic, int lCveSol, string strModulSol, int lCveInc, short intAnio, string strOficRecl, string intnumrec);
          [DispId(1610809345)]
          public virtual ADODB._Recordset_Deprecated SelCobertura(string strRamo, string strSubRamo, string strCveCober);
          [DispId(1610809350)]
          public virtual ADODB._Recordset_Deprecated SelEstCobertura(string strRamo, string strSubRamo, short intAnio, string strOficRecl, int lNumRec, short intCveInc, string strCveCober);
      }
  </code></pre>
  
  <p>So I think there is a problem with the importing  step,</p>
  
  <p>Anyone have an idea of how to make this works, or there is another form to load execute a method from a dll who is registered in COM?</p>
  
  <p>Any help would be really apreciated.</p>
  
  <p>Thanks in advance.</p>