Connection Pooling with SQL and ASP

I'm a little confused on connection pooling. Can someone tell me how to revise the following simple code so that I utilize connection pooling? Can I do it just in the connection string or is there another way?

Dim connection, strSQL, rstest

set connection = Server.CreateObject("ADODB.Connection")
connection .Open "Provider=SQLOLEDB; Data Source=Locahost; Initial Catalog=northwind; User ID=username; Password=password"

strSQL = "SELECT * FROM Customers WHERE Company = 'Test Comany' ORDER BY CompanyName asc"
Set rstest= Server.CreateObject("ADODB.Recordset")
rstest.Open strSQL, connection, 0
Do while rstest.eof = false

response.write(rstest("Firstname") & " " & rstest("LastName")  & "<br />")


set rstest= nothing
set connection = nothing
Who is Participating?
dwkorConnect With a Mentor Commented:
It would be reused automatically when you're using the same connection strings unless you disable it there.
Try this one :
Data Source = xxxx; Initial Catalog = xx; User Id=xx; Password=xx; connection reset = true; enlist= true; min pool size=1; max pool size=999;
Guy Hengel [angelIII / a3]Billing EngineerCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.