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
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