Could not load type 'ADODB.FieldsToInternalFieldsMarshaler' from assembly

孤人 提交于 2019-12-30 08:34:08

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/6214892/could-not-load-type-adodb-fieldstointernalfieldsmarshaler-from-assembly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!