Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum Command and Connection timeout

Status
Not open for further replies.

raselwasel

Programmer
Dec 12, 2003
9
0
0
PH
I created an application using visual basic 6 and SQL Server 2000 as its backend. I was trying to execute a query, but it always get an error msg saying CONNECTION TIMEOUT. I set the command and connection timeout to 10,000 already and still get the same error msg. Here's my question, what is the maximum command and connection timeout? Your answers will be greatly appreciated. ^_^
 
Connection Timeouts are normally for when you log in. ie how long it will wait for the server to respond to the login request.

How long does it take to run your query in Query analyser?

Can you give more info like how you are making the connection to the database? Can you do simple queries fine on that connection? How much data are you trying to push across the network? What is the traffic normally like on your network? Are you using DCOM?





Hope I've been helpful,
Wayne Francis

If you want to get the best response to a question, please check out FAQ222-2244 first
 
my query takes for about 5-15 mins, depending on the filters that a user has set. i'm talking here from tens of thousands to hundreds of thousands of records. my connection to my server is like this:

repconn.CursorLocation = adUseClient
repconn.ConnectionString = "DSN=" & company & ";UID=sa;PWD=sasa;Database=REPORTS;"
repconn.Mode = adModeReadWrite
repconn.ConnectionTimeout = 10000
repconn.CommandTimeout = 10000
repconn.Open

i don't use DCOM...


 
Are you using a cursor? Then you probably are not running an efficient query. Post the query and we'll see if we can make suggestions for improvement.

BTW connecting using the sa user is a very poor practice. Users should not have system admin rights.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top