Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Posts
    21

    Question Unanswered: 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.

  2. #2
    Join Date
    Feb 2003
    Location
    Montreal, Canada
    Posts
    117

    Re: Connection pooling in MSSQL via VB

    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.
    Steve

  3. #3
    Join Date
    Jul 2003
    Posts
    18

    Re: Connection pooling in MSSQL via VB

    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.

  4. #4
    Join Date
    Jan 2003
    Posts
    21

    Re: Connection pooling in MSSQL via VB

    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!

  5. #5
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    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.
    MCDBA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •