开发者

Could not load type 'ADODB.FieldsToInternalFieldsMarshaler' from assembly

I have the following code:

MAPITable mt = rStores.MAPITable;

        Recordset rs = new Recordset();
        rs = mt.ExecSQL(@"SELECT EntryID开发者_如何学C, ""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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜