Running ADOMD .NET in a separate thread -
12-05-2005
, 05:42 PM
We have a VB .NET application that connects to a SQL Server Analysis
Services (2000) server.
We want to provide our users with the opportunity to cancel execution during
long queries so in order to be responsive to the users actions we have tried
executing the query from another thread.
This runs fine but seems to mess up the AdomdConnection object i.e. once the
spawned thread has finished executing and control is returned to the main
thread, then although the State property of the AdomdConnection object
returns Open, referencing other properties may raise a
InvalidOperationExeception or InvalidCastExeception.
The only way I have found to ensure the integrity of the AdomdConnection
object after execution is to close and reopen the connection which can take
some time.
Any ideas?
Chris |