| | | StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 8:57:42 AM Posts: 244, Visits: 818 |
| | I have a query that is taking about 90 seconds. The window times out before any data is displayed. How do I increase the connection timeout for this query? Thanks, Bill |
| | | | StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 8:57:42 AM Posts: 244, Visits: 818 |
| | Perhaps I should have title this thread: Increase Query Timeout |
| | | | StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 8:57:42 AM Posts: 244, Visits: 818 |
| | Here is the error: "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." My query has been timed at about 90 seconds. What can I do to get StrataFrame to increase this timeout? Thanks!! |
| | | | StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 6:40:31 PM Posts: 288, Visits: 1,137 |
| | | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 2 days ago @ 3:00:03 PM Posts: 309, Visits: 1,816 |
| | Bill, You can set the remote query timeout on the server, I had to change this when I was doing some import operations from my old foxpro data to Sql. I'm not sure if there is a way to change it ona per query basis but this did work for me with the same error.  |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 2 days ago @ 3:00:03 PM Posts: 309, Visits: 1,816 |
| | Bill, I thought that I had found where to set it on a per query basis, I set it server wide to deal with an issue with E-connect for Great Plains, to set in on a per query basis simply set the commandtimeout property of the Sql Command. Dim loCommand As New SqlCommand()loCommand.CommandTimeout = 150 '-- Build the QueryloCommand.CommandText = "SELECT * FROM WHATEVER" |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 10:22:11 PM Posts: 3,733, Visits: 3,928 |
| Yeah, Paul nailed it on the last post. The most common timeout that is overlooked is on the command itself. You can set the connection timeout until you are blue in the face...but if you don't set the command time out it can still timeout on you. So if you set the command timeout you should be good to go! |
| | | | StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 8:57:42 AM Posts: 244, Visits: 818 |
| | Thanks Paul and Edhy!! I am still using SQL Server 2000...I will see if I can find a corresponding configuration for setting the timeout. Here is my code that I use for retrieving the data: String mPartNum = String.Empty; if (PartNumCBE.SelectedValue != null) { mPartNum = (String)PartNumCBE.SelectedValue; } SqlParameter mItemCode = new SqlParameter("@partnum", mPartNum); ADUserBO mADUser = new ADUserBO(); SqlParameter mDiv = new SqlParameter("@div", mADUser.LocationIndex); SqlParameter mInvDate = new SqlParameter("@invdate", InvDateDE.DateTime.ToShortDateString()); rawMaterialValuationBO1.FillByStoredProcedure("spx_GetRunningInventory_FinishedGoods", mItemCode, mDiv, mInvDate); gridView1.Columns["CurrQty"].FilterInfo = new DevExpress.XtraGrid.Columns.ColumnFilterInfo("CurrQty > 0"); gridView1.ApplyColumnsFilter();If the command timeout can be set, how do I do that from the BO? Thanks, Bill |
| | | | | |
|