Graham Wright
Guest
|
Posted:
Sun Aug 28, 2005 4:58 pm Post subject:
Re: CDO to ADO |
|
|
I have now solved this and I am posting the solution in case anybody else
has a similar problem.
I was looking for a way of using the IMessage object because I was
experiencing problems opening a Record object.
The problem was that the Connection used for the IMessage object needs to be
cast to an IDispatch when opening the Record object.
The below now works;
_RecordPtr pRecord;
pRecord.CreateInstance(__uuidof(Record));
pRecord->Open(_variant_t(sURLItem), _variant_t((IDispatch*)pConnection),
adModeReadWrite, adFailIfNotExists, adOpenSource, _bstr_t(""), _bstr_t(""));
pRecord->DeleteRecord( _bstr_t(sURLItem), false);
pRecord->Close();
--
Graham Wright
"Graham Wright" <grahamwright@msn.com> wrote in message
news:uIpU$a0qFHA.1132@TK2MSFTNGP10.phx.gbl...
| Quote: | I have a CDO IMessage object which I use in an Exchange asyn event sink to
extract incomming attachments.
After I have done this I want to delete the mail message.
It seems to do this I need to call the DeleteRecord member on an ADO
_Record object.
How do I obtain this _Record object from the IMessage object
The IMessage object has been created by calling Open on its DataSource
using an ADODB.Connection
--
Graham Wright
grahamwright@msn.com
|
|
|