
free threaded ATL, MTS, ADO problem
Hi all,
I created two free threaded ATL COM objects (one call manager, another call
staff) using VC++ 6 with SP3. manager creates and instance of staff, the
staff retrieves an ADO (2.1) recordset using adAsyncFetch | adAsyncExecute.
Before Open is called on the recordset pointer, I set CursorLocation =
adUseClient, then set Properties("Initial Fetch Size") = 1. (BTW, I am
using SQLOLEDB as provider).
My problem:
1) I created a VB client to create an instance of manager object in
Form_Load (destroyed in Form_Unload). The FetchComplete and FetchProgress
events are never raised (I write a line in the log file when each event is
fired).
2) Using the VB client, after Open is called in the staff object, CPU goes
up to 100% for VB6. No idea why. (I wonder if this relates to the objects
are free-threaded and vb is apartment threaded.)
3) I put the objects in MTS, created an ASP that has the same content as in
VB, except the object is destroyed in OnSession_End. Same thing happens as
in VB program. (Do I need to do anything special in MTS to let it know this
object is free-threaded?)
Any idea? Thank you in advance.
Anita