• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

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 />")

rstest.movenext
loop

rstest.close
set rstest= nothing
connection.close
set connection = nothing
--------------------------------------------------------------------------
0
sportzone
Asked:
sportzone
1 Solution
 
dwkorCommented:
It would be reused automatically when you're using the same connection strings unless you disable it there.
0
 
yatin_81Commented:
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;
0
 
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.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now