Re: OLE error 80040200 when assigning events of a TCustomADODataset pointingto a multi-select stored proc
From: Oliver Giesen (NO.ogware.SPAM_at_gmx.ALLOWED.net.INVALID)
Date: 05/05/04
- Next message: Viatcheslav V. Vassiliev: "Re: OLE error 80040200 when assigning events of a TCustomADODataset pointingto a multi-select stored proc"
- Previous message: Brian Cryer: "Re: Reading the definition of a view"
- In reply to: Oliver Giesen: "OLE error 80040200 when assigning events of a TCustomADODataset pointing to a multi-select stored proc"
- Next in thread: Viatcheslav V. Vassiliev: "Re: OLE error 80040200 when assigning events of a TCustomADODataset pointingto a multi-select stored proc"
- Reply: Viatcheslav V. Vassiliev: "Re: OLE error 80040200 when assigning events of a TCustomADODataset pointingto a multi-select stored proc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 05 May 2004 15:26:03 +0200
Oliver Giesen wrote:
> I have traced the problem down to the call to
> ConnectionPoint.UnAdvise in TCustomADODataSet.InternalClose but have no
> real idea how to proceed from there with my investigations.
I have now performed some further tracing and I think I have identified
a bug in the VCL. What appears to happen is that EnableEvents is being
called too early, i.e. before it has been decided which recordset will
be used:
In the TCustomADODataset.OpenCursor method, the recordset events are
initialized for the first recordset but only later on a check is
performed whether that recordset is closed and whether there might be
yet another one that is not. If this is the case the internal recordset
pointer (which was used to identify the ConnectionPoint for the events
in the first step) is reset to the first non-closed recordset. Now, when
in InternalClose it is attempted to unadvise the events again, this is
performed on a different recordset than the current one... this appears
to be in line with another observation I made, namely that the recordset
event handlers never fire for this specific stored proc.
Could this be the reason for the failure? How would I work around it?
My first thought was to unadvise the erroneously assigned events from
the first/inactive recordset and then readvise them to the current
recordset by calling EnableEvents again.
But how do I get back to that first recordset? How do I reset the iterator?
Cheers,
Oliver
- Next message: Viatcheslav V. Vassiliev: "Re: OLE error 80040200 when assigning events of a TCustomADODataset pointingto a multi-select stored proc"
- Previous message: Brian Cryer: "Re: Reading the definition of a view"
- In reply to: Oliver Giesen: "OLE error 80040200 when assigning events of a TCustomADODataset pointing to a multi-select stored proc"
- Next in thread: Viatcheslav V. Vassiliev: "Re: OLE error 80040200 when assigning events of a TCustomADODataset pointingto a multi-select stored proc"
- Reply: Viatcheslav V. Vassiliev: "Re: OLE error 80040200 when assigning events of a TCustomADODataset pointingto a multi-select stored proc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|