Sunday, March 25, 2012

Connection pooling in MSSQL via VB

Hi folks,
Is there a way to implement connection pooling in MSSQL 7 or 2k when accessing it from VB?
Thanks.Yes, if you implement the VB data consuming object as a MTS COM object (COM DLL). MTS is already integrated in COM+ with w2k.

Originally posted by lokem
Hi folks,

Is there a way to implement connection pooling in MSSQL 7 or 2k when accessing it from VB?

Thanks.|||If you use ADO via ODBC, and you:

1. enable connection pooling in ODBC control panel
2. make sure you Close() your connection and set it to nothing when you've finished using it

...then you've got connection pooling. I think the closed connection objects hang around for a default of 60 seconds.|||Originally posted by dbadelphes
Yes, if you implement the VB data consuming object as a MTS COM object (COM DLL). MTS is already integrated in COM+ with w2k.

So I just have to get it registered to Component Services for a computer and I'm set? Do I need to do anything special when defining the connection string?

mwilkes: Thanks for the tip. Will be trying that out!|||To make Coonection Pooling work you also need to make sure that you use the same connection string all the time. In the past developers used the same UID, PWD, DATABASE and SERVER in the connection string but would change ApplicationName by setting it to a UserID so they could distinguish connections via IIS. This would end up creating a seperate connection.

No comments:

Post a Comment