October 6, 2004 at 1:13 am
greetings
i'am continously getting timeout expired message in running the app i made using sql as the back end, at first i thought it was the window server but i realized the error occurs when the app start to open the recordsets.
also within the sql server I tried to copy database from one server to another it always failed due to timeout expired. I realy dont know what is causing it, i tried increasing the connectintimeout but its same. this timeout error starts occuring after I have re-installed the sql-server. is there any way to check or correct this problem except unstalling and reinstalling sql server?, this was not happening b4 re-installing the sql server
thanks
cyrus
October 6, 2004 at 4:39 am
How do you connect? What's your connection string ? Do you also get timeouts in Query Analyzer when accessing the same records as your app ?
To me it sounds like a locking problem. Does sp_lock show anything ?
October 6, 2004 at 3:27 pm
Try using commandtimeout on your command object instead
Dim objConn As SqlConnection = New SqlConnection(strConn)
Dim objCmd As SqlCommand = New SqlCommand(strSQL, objConn)
objCmd.CommandTimeout = 0
Set it to "0" for infinite. Now you may open your connection and execute the command.
objConn.Open
objCmd.Execute
Let me know if that works 4 you
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply