Throwing System.MissingMethodException while trying to append fields to an ADODB recordset in a VSTO Excel Add-in being upgrade from XLA.

I am upgrading/updating an old Excel 2003 XLA Add-in into a Excel 2013 VSTO Add-in.  I manually copied and then pasted the code into the new project and cleared a massive number of errors that mainly had to do with changes in enumeration.

The add-in utilized ADO disconnected recordsets for sorting and filtering.

I added a reference to Microsoft ActiveX Data Objects 2.8 Library into the project and imported ADODB into the module throwing the error.  The intellisense for the objects works as expected.  However, the System.MissingMethodException appears at runtime.  

I know the  method exists and I am unclear on how this is broken.

 Sub CreateRecordSet()

        rs = New ADODB.Recordset
        With rs
            ' prime for use in disconnected mode
            .ActiveConnection = Nothing
            .CursorLocation = CursorLocationEnum.adUseClient
            .LockType = LockTypeEnum.adLockBatchOptimistic

            ' Create columns in your record
            With .Fields
                 .Append("Name", DataTypeEnum.adVarChar, 75)    '  <<---Exception thrown here!!
                .Append("Company", DataTypeEnum.adVarChar, 75)
                .Append("Position", DataTypeEnum.adVarChar, 75)
                .Append("Bed", DataTypeEnum.adVarChar, 15)
                .Append("LifeBoat", DataTypeEnum.adVarChar, 15)
                .Append("RowNumber", DataTypeEnum.adInteger)
                .Append("EmerResp", DataTypeEnum.adBoolean)
            End With
        End With

        rs.Open() ' first open the recordset
Who is Participating?
Tesla428Author Commented:
Fixed.  Downgraded from Microsoft ActiveX Data Objects 2.8 Library to version 2.5.  Must be something different in the syntax.  No issue.
If you are upgrading it, why not use the opportunity to get rid of obsolete technology (ADODB) at the same time?
Tesla428Author Commented:

Not above replacing ADODB even though I am sure that it should work.  It was used for the simplicity of being able to use SQL base filtering and sorting.

You are recommending a better solution?
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tesla428Author Commented:
Issue was completely related to differences between ADO 2.8 and 2.5.
Tesla428Author Commented:
Issue was completely related to differences between ADO 2.8 and 2.5.  Found on my own.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.