RE: IErrorInfo and IErrorRecords (Repost under different Name)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



See the reply to your original posting.
--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Nom" wrote:

> Sorry for the repost but I wanted to post again under my msdn subscription so
> hopefully somebody from MS will see this.
>
> I have written an OLE DB provider and I'm trying to get OLE Automation
> error handling working.
>
> If my OLE DB provider throws an error in a Win32 application like
> Crystal I get the error message just fine. If it throws an error in a
> .Net application like Microsoft Reporting Services I get Specified cast
> is not valid. The exception comes from the
> System.Data.OleDb.OLEDbException's constructor. I used a disassembler
> to look at the constructor and it looks like it fails on:
>
> this.oledbErrors = new
> OleDbErrorCollection((UnsafeNativeMethods.IErrorRecords) errorInfo);
>
> Where errorInfo is instance of UnsafeNativeMethods.IErrorInfo. I
> assume these UnsafeNativeMethods are wrappers around the com objects,
> any guesses why this cast blows up and is there anything I can do about
> it from the COM side. I'm just using the standard ICreateErrorInfo to
> setup the IErrorInfo object.
>
> Thanks
> Norm Johanson
.



Relevant Pages

  • IErrorInfo and IErrorRecords (Repost under different Name)
    ... I have written an OLE DB provider and I'm trying to get OLE Automation ... System.Data.OleDb.OLEDbException's constructor. ... Where errorInfo is instance of UnsafeNativeMethods.IErrorInfo. ... setup the IErrorInfo object. ...
    (microsoft.public.data.oledb)
  • IErrorInfo and IErrorRecords
    ... I have written an OLE DB provider and I'm trying to get OLE Automation ... Where errorInfo is instance of UnsafeNativeMethods.IErrorInfo. ... setup the IErrorInfo object. ...
    (microsoft.public.data.oledb)