Click here to Skip to main content
15,911,360 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all, i have created simple tool in vb.net, that tool will read all data's from one database to another
database
i am getting error between 2 to 3 min that

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

i am opening and closing my connection properly even i am getting this error
this is my code here
VB
con1.open()
    Dim cmd As New SqlCommand(StrSql, con1)
    cmd.Connection = con1
    OpenRs1 = cmd.ExecuteReader()
    con1.close
Posted
Updated 3-Jul-12 22:49pm
v2

1 solution

The timeout may also indicate that a certain query takes too long to execute. If you don't provide a timeout to the connection, the default will be set to 30 seconds. If a query (or command) takes longer than 30 seconds, you'll receive a timeout exception. Try setting the timeout property on the connection to a larger timeout.

Hope this helps,
Eduard
 
Share this answer
 

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