Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all i have created small mobile application ,from my application i ll connect with server machine, my problem is
when server is available its taking jus 1 sec to connect with server,but when server is unavailable its too long to
return error message

this is my connection string

HTML
Persist Security Info=False;Integrated Security=False;Server=xxxx;initial catalog=ProductionPDA;user id=myuser;password=xxxx;Connection Timeout=10 
Posted
Updated 26-Mar-12 21:12pm
v6
Comments
ZurdoDev 26-Mar-12 8:56am    
So, how long is it taking to timeout?
sameertm 26-Mar-12 9:58am    
its taking more than 2 min.. in my case if the connection fails,it should alert me with in 2 to 5 seconds..
fjdiewornncalwe 26-Mar-12 10:19am    
If the connection fails, an exception will be thrown. If it takes 2 minutes or so, then you have a long running query on your database. If the connection attempt is taking 2 minutes plus then you have another infrastructure related issue.
sameertm 26-Mar-12 10:49am    
no i am not passing any long query to database, just i am trying to open my database .. that's it.
OriginalGriff 27-Mar-12 3:17am    
Don't bump your question, unless you are adding information - it is rude, and can annoy people.

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