Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to know if this is possible. Thanks.

VB
Public conn() As New ADODB.Connection

Public Sub ConnectDatabase1(ByVal SERVER As String)
    Dim i As Integer
    For i = 1 To 10
        conn(i).CursorLocation = adUseServer
        conn(i).ConnectionTimeout = 50
        conn(i).CommandTimeout = 0
        conn(i).ConnectionString = "Provider=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=False;Data Source=" & SERVER
    Next i
End Sub
Posted
Updated 7-Feb-12 0:26am
v3
Comments
Slacker007 7-Feb-12 6:26am    
Edits made: formatting and title.
Herman<T>.Instance 7-Feb-12 6:48am    
why don't you use connection pooling ?
jdandes 7-Feb-12 7:34am    
what is connection pooling?
Herman<T>.Instance 7-Feb-12 16:24pm    
in your connection string you can add connection pooling.
See here and here
ZurdoDev 7-Feb-12 16:44pm    
Likely possible buy why do you want to do it? What are you trying to accomplish?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900