Increase Connection Timeout
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Increase Connection TimeoutExpand / Collapse
Author
Message
Posted 05/08/2008 5:58:22 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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

Post #16265
Posted 05/08/2008 6:33:18 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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
Post #16269
Posted 05/08/2008 6:50:19 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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!!

Post #16271
Posted 05/08/2008 10:18:34 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 6:40:31 PM
Posts: 288, Visits: 1,137
Hi Bill,

I found a thread that may give you an idea about using a separate thread for your query.  Check it here: http://forum.strataframe.net/FindPost11979.aspx

Edhy Rijo
Progytech (Computer Consultants)
Post #16274
Posted 05/09/2008 7:18:03 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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.

Post #16276
Posted 05/09/2008 7:38:43 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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 Query

loCommand.CommandText = "SELECT * FROM WHATEVER"

Post #16277
Posted 05/09/2008 9:24:01 AM


StrataFrame Developer

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!
Post #16283
Posted 05/09/2008 9:36:04 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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

Post #16288
Posted 05/09/2008 9:52:02 AM