O
Omatase
Here is my code:
CDO.Message iMessage = new CDO.MessageClass();
string sFrom; string sDate;
iMessage.DataSource.Open(bstrURLItem,null,
ADODB.ConnectModeEnum.adModeRead,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource,"","");
Here is the compilation error:
The type 'ADODB.ConnectModeEnum' is defined in an assembly that is not
referenced. You must add a reference to assembly 'ADODB,
Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. C:\Documents and
Settings\davidbr\My
Documents\Visual Studio
2005\Projects\InformXY\InformXY\ExchangeEventSink.cs 45 25
InformXY
the error comes from argument number 3 on line:
iMessage.DataSource.Open(bstrURLItem,null,
ADODB.ConnectModeEnum.adModeRead,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource,"","");
I get a similar error on the 4th and 5th arguments.
Here are some things I have tried that didn't work:
couldn't cast to ADODB.ConnectModeEnum
couldn't use corresponding integer values
I am using C# 2.0. I copied the code directly from a project that works
fine in 1.1. I created interop dlls using tlbimp on some exchange dlls.
The iMessage object was instantiated from a namespace derived from one
dll and the enums wer in another. My only working idea is that I need
to make these interop dlls out of compatible versions of original
exchange dlls.
I imagine there may be a work around I can use here to tell it to use
the code as is even though it comes from a different assembly or to
force it to just use the integer counterparts for the enum values.
CDO.Message iMessage = new CDO.MessageClass();
string sFrom; string sDate;
iMessage.DataSource.Open(bstrURLItem,null,
ADODB.ConnectModeEnum.adModeRead,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource,"","");
Here is the compilation error:
The type 'ADODB.ConnectModeEnum' is defined in an assembly that is not
referenced. You must add a reference to assembly 'ADODB,
Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. C:\Documents and
Settings\davidbr\My
Documents\Visual Studio
2005\Projects\InformXY\InformXY\ExchangeEventSink.cs 45 25
InformXY
the error comes from argument number 3 on line:
iMessage.DataSource.Open(bstrURLItem,null,
ADODB.ConnectModeEnum.adModeRead,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource,"","");
I get a similar error on the 4th and 5th arguments.
Here are some things I have tried that didn't work:
couldn't cast to ADODB.ConnectModeEnum
couldn't use corresponding integer values
I am using C# 2.0. I copied the code directly from a project that works
fine in 1.1. I created interop dlls using tlbimp on some exchange dlls.
The iMessage object was instantiated from a namespace derived from one
dll and the enums wer in another. My only working idea is that I need
to make these interop dlls out of compatible versions of original
exchange dlls.
I imagine there may be a work around I can use here to tell it to use
the code as is even though it comes from a different assembly or to
force it to just use the integer counterparts for the enum values.