MattWoberts
Programmer
Hi,
I have a small VB6 COM component that deals with dataacess - it executes SQL statements against a database using ADO. Its an ActiveX DLL, and is apartment threaded (default settings).
My problem is that there is a reasonable amount of initialisation code that my COM object needs to do - it needs to load the connection string from a config file. This data access component is used frequently by many clients - which are other COM components called from ASP pages. What this means is that the init. code that gets the connection string from the config file is repeated often per page request - in some cases upto 20 times !!
I want to do something about this, but in VB6 I seem to be limited to what I can do. Ideally, I would pool my object and use COM+ to manange that, but I believe I can't pool VB6 objects in COM+ because of the threading model they use. Is this true?
Other options I have:
1) Re-write the VB6 class in VC++/ATL, which should allow me to configure it for object pooling..
2) Instead of pooling, once I have the connection string (which is static), cache it somewhere (but where?)
Any pointers would be very welcome!! I'm completely new to COM+ so I dont know how/if it can help me here...
I have a small VB6 COM component that deals with dataacess - it executes SQL statements against a database using ADO. Its an ActiveX DLL, and is apartment threaded (default settings).
My problem is that there is a reasonable amount of initialisation code that my COM object needs to do - it needs to load the connection string from a config file. This data access component is used frequently by many clients - which are other COM components called from ASP pages. What this means is that the init. code that gets the connection string from the config file is repeated often per page request - in some cases upto 20 times !!
I want to do something about this, but in VB6 I seem to be limited to what I can do. Ideally, I would pool my object and use COM+ to manange that, but I believe I can't pool VB6 objects in COM+ because of the threading model they use. Is this true?
Other options I have:
1) Re-write the VB6 class in VC++/ATL, which should allow me to configure it for object pooling..
2) Instead of pooling, once I have the connection string (which is static), cache it somewhere (but where?)
Any pointers would be very welcome!! I'm completely new to COM+ so I dont know how/if it can help me here...