Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load type 'ADODB.FieldsToInternalFieldsMarshaler' from assembly

Tags:

c#

.net

adodb

I have the following code:

MAPITable mt = rStores.MAPITable;

        Recordset rs = new Recordset();
        rs = mt.ExecSQL(@"SELECT EntryID, ""http://schemas.microsoft.com/mapi/proptag/0x0FF60102"" As PR_INSTANCE_KEY from Name");

        while (!rs.EOF)
        {
            var fields = ((dynamic)rs.Fields);
            for (int f = 0; f < fields.Count; f++)
            {
                var field = fields[f];
                var name = field.Name;
                var value = field.Value;
            }
            Debug.Print(rs.Fields["EntryID"].Value);
            Debug.Print(rs.Fields["PR_INSTANCE_KEY"].Value);
            rs.MoveNext();

When I try to access the recordset fields, I get the aforementioned error in the subject. I saw the question posted here, but that did not help me.

UPDATE: Nevermind - workaround listed here

like image 995
Larry G. Wapnitsky Avatar asked Jun 02 '11 13:06

Larry G. Wapnitsky


1 Answers

Unfortunately your link to the workaround is broken. Page Not found. I found the following workaround.

ADODB Properties from References: Embed Interop Types: false Copy local: true specific version (in English maybe isolated?): false

like image 195
float Avatar answered Sep 23 '22 23:09

float