﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Increase Connection Timeout</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 05 May 2026 22:09:46 GMT</lastBuildDate><ttl>20</ttl><item><title>Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16265.aspx</link><description>I have a query that is taking about 90 seconds.&amp;nbsp; The window times out before any data is displayed.&amp;nbsp; How do I increase the connection timeout for this query?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Bill</description><pubDate>Thu, 15 Jan 2009 15:43:48 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21545.aspx</link><description>Cool.&amp;nbsp; It is cool watching it show the progress while updating a single field, huh?&amp;nbsp; I still enjoy uploading large files where we have this implemented just so I can watch it progress :D</description><pubDate>Thu, 15 Jan 2009 15:43:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21499.aspx</link><description>Thanks Trent&lt;/P&gt;&lt;P&gt;We have this working well now, thanks for the help&lt;/P&gt;&lt;P&gt;Kenneth langley</description><pubDate>Tue, 13 Jan 2009 13:07:50 GMT</pubDate><dc:creator>Kenneth Langley</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21474.aspx</link><description>You can go at this a number of ways, but here is a quick sample.&amp;nbsp; Let's first put a method on the BO where the varbinary field resides:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BO Method&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[codesnippet]''' &amp;lt;summary&amp;gt;&lt;BR&gt;''' Updates a blob or binary field on a thread with callback methods updating the progress&lt;BR&gt;''' &amp;lt;/summary&amp;gt;&lt;BR&gt;Public Sub UpdateBlobData(ByVal pk As Integer, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByVal data As Byte(), _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByVal displayText As String, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByVal progressCallback As BlobProgressDelegate, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByVal completeCallBack As BlobPushCompleteDelegate, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByVal errorCallback As BlobErrorDelegate)&lt;BR&gt;'-- Establish Locals&lt;BR&gt;Dim pkValue As New MicroFour.StrataFrame.Business.PrimaryKeyValue(New Object() {pk})&lt;/P&gt;&lt;P&gt;'-- Start the update progress&lt;BR&gt;Me.PushBlobFieldAsync(pkValue, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "FieldName", _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 84000, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayText, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; progressCallback, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; completeCallBack, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errorCallback)&lt;BR&gt;End Sub[/codesnippet]&lt;/P&gt;&lt;P&gt;In this example, the above field name is "FieldName" so we would add "FieldName" to the FieldsToExcludeFromUpdate and FieldsToExcludeFromInsert.&amp;nbsp; This way the PK, time stamp columns, etc. would save before we try to save our blob data.&amp;nbsp; So taking this example, and assuming that you have added the "FieldName" to the FieldsToExclude properties on the BO, the code would look something like this:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;BR&gt;'-- Save the BO data to the server minus the blob field.&amp;nbsp; The Blob field will not be included because&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; it should have been added to the FieldsToExcludeFrom... properties.&lt;BR&gt;MyBO.Save()&lt;BR&gt;&lt;BR&gt;'-- Now that all other fields of the BO have been saved, it is time to save the blob data&lt;BR&gt;MyBO.UpdateBlobData(MyBO.PrimaryKeyField, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BlobDataAsByteArray, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Saving large data", _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddressOf HandlePushProgress, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddressOf HandlePushComplete, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddressOf HandlePushError)&lt;BR&gt;&lt;BR&gt;''' &amp;lt;summary&amp;gt;&lt;BR&gt;''' Handles the completion of a push of a media item to the serve&lt;BR&gt;''' &amp;lt;/summary&amp;gt;&lt;BR&gt;Private Sub HandlePushComplete(ByVal state As Object)&lt;BR&gt;&amp;nbsp;'-- Place any post push logic here (i.e. update the dialog, start a new update, etc.)&lt;BR&gt;End Sub&lt;/P&gt;&lt;P&gt;''' &amp;lt;summary&amp;gt;&lt;BR&gt;''' Handles an error in the push process&lt;BR&gt;''' &amp;lt;/summary&amp;gt;&lt;BR&gt;Private Sub HandlePushError(ByVal ex As Exception, ByVal state As Object)&lt;BR&gt;&amp;nbsp;MicroFour.StrataFrame.Application.StrataFrameApplication.ShowRedExceptionDialog(ex)&lt;BR&gt;End Sub&lt;/P&gt;&lt;P&gt;''' &amp;lt;summary&amp;gt;&lt;BR&gt;''' Handles the progress of an upload or download from the server&lt;BR&gt;''' &amp;lt;/summary&amp;gt;&lt;BR&gt;Private Sub HandlePushProgress(ByVal currentCount As Long, ByVal totalCount As Long, ByVal nextIncrement As Byte(), ByVal state As Object)&lt;BR&gt;&amp;nbsp;'-- Update the progress&lt;BR&gt;&amp;nbsp;lblProgress.Text = CType(state, String)&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;'-- Update the thermo&lt;BR&gt;&amp;nbsp;Try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Don't let the progress go above the max value&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If prgProgress.Value &amp;gt; totalCount Then prgProgress.Value = totalCount&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prgProgress.Maximum = totalCount&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prgProgress.Value = currentCount&lt;BR&gt;&amp;nbsp;Catch ex As Exception&lt;BR&gt;&amp;nbsp;End Try&lt;BR&gt;End Sub&lt;BR&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;That should give you a good starting point.</description><pubDate>Mon, 12 Jan 2009 10:08:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21450.aspx</link><description>Trent&lt;/P&gt;&lt;P&gt;I cannot find any documentation for the push/pull BLOB functions you referenced. Could you please give us a sample or point me to where it is used.</description><pubDate>Thu, 08 Jan 2009 15:43:55 GMT</pubDate><dc:creator>Kenneth Langley</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21376.aspx</link><description>Good point.&amp;nbsp; Yes, they should.</description><pubDate>Fri, 02 Jan 2009 15:25:58 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21374.aspx</link><description>Hi Trent,&lt;P&gt;When using the Push/Pull methods should the VarBinary fields be included in the BO &lt;FONT size=2&gt;FieldsToExcludeFromInsert and &lt;FONT size=2&gt;FieldsToExcludeFromUpdate properties?&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Fri, 02 Jan 2009 11:17:37 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21370.aspx</link><description>Guys, sorry for the super delayed response here.&amp;nbsp; We have not been in the office (and still aren't) and I have not been able to get the forum until now.&lt;/P&gt;&lt;P&gt;Let me propose another avenue that is much more beneficial to you and the end-user when waiting for large VarBinary(MAX) fields.&amp;nbsp; StrataFrame has two push methods and two pull methods for this very purpose called: PushBlobField, PushBlobFieldAsync, PullBlobField, and PullBlobFieldAsync.&lt;/P&gt;&lt;P&gt;Whether you choose to use the async method or block and use the non-async methods, this will never timeout and will stream as big of a file that you will ever use.&amp;nbsp; If you use the async method (which I recommend) you can also add handlers to show a progress bar of the save and/or retrieval.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Push Async Example&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[codesnippet]MyBO.PushBlobFieldAsync(PkValueToUpdate, "DataField", byteData, 84000, displayText, progressCallback, completeCallBack, errorCallback)[/codesnippet]&lt;/P&gt;&lt;P&gt;The pull will work very much like the push.&amp;nbsp; This is a great method and is what we do when updating large binary data fields....that is how this made it into the framework :)</description><pubDate>Fri, 02 Jan 2009 11:00:11 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21369.aspx</link><description>You may also want to look at your database maintenance plan and make sure that the statistics are being refreshed or try analyzing your query in the database engine tuning advisor. I've seen a query drop from 30+ seconds to under a second after tunng. You may also want to consider using the SF Enterprise server to eliminate the database traffic between the client and DB server over your wide area network.&lt;/P&gt;&lt;P&gt;-Larry</description><pubDate>Tue, 30 Dec 2008 18:16:19 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21367.aspx</link><description>Hi Bill,&lt;/P&gt;&lt;P&gt;Just looked at the code in your post and the line:&lt;/P&gt;&lt;P&gt;cmd.Parameters.AddWithValue(&lt;FONT color=#a31515 size=2&gt;"@invdate"&lt;/FONT&gt;&lt;FONT size=2&gt;, InvDateDE.DateTime.ToShortDateString()).SqlDbType = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlDbType&lt;/FONT&gt;&lt;FONT size=2&gt;.VarChar;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;may need attention IF InvDate is an indexed column in your database. If it is then the parameter must a Date data type not VarChar.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;If you need to pass in a VarChar data type then your proc needs to convert the value to&amp;nbsp;a date data type before it is used in a Where clause. If this isn't done you will end up with a full table scan rather than a Seek on your InvDate index.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Cheers, Peter&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 30 Dec 2008 16:40:42 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21366.aspx</link><description>Hi Bill,&lt;/P&gt;&lt;P&gt;You could try putting:&lt;/P&gt;&lt;P&gt;Option (Recompile)&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;as the last line in your proc. This will cause SQL to recalculate its execution plan each time the proc runs. While&amp;nbsp;this, in itself is an overhead, it is better than using an old and entirely inappropriate plan if you have a wide range of options that SQL should be considering on each execution although SQL is supposed to be pretty smart in knowing when to recalculate an execution plan.&lt;/P&gt;&lt;P&gt;Bottom line is that 90 seconds is a looooong time and the issue is probably in the area of your proc using full table scans rather than index seeks. Just in case you don't know - the best way to sort these issues is to put the proc's code&amp;nbsp;is Query Analyzer and have a look at the Execution Plan&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Tue, 30 Dec 2008 16:33:04 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21364.aspx</link><description>More detail, we have a varbinary(max) field with binary data. This field size could be in the megabytes range. It appears that when moving the binary data is when the timeout occurs. Any more ideas ?</description><pubDate>Tue, 30 Dec 2008 14:56:01 GMT</pubDate><dc:creator>Kenneth Langley</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21363.aspx</link><description>Wow, I remember when a T1 was a fast connection! :D&lt;br&gt;
&lt;br&gt;
You might try just writing your own FillByPrimaryKey, put it your base BO, so all your BOs use it and none of the client code needs changing. You could then reference a property that you can set to increase the timeout. The FillByPrimaryKey code is easy, especially if you only need to overload one of them. Then you could set the timeout on the SqlCommand object:&lt;br&gt;
&lt;br&gt;
[codesnippet]Public Overloads Sub FillByPrimaryKey(key As Integer)&lt;br&gt;
&amp;nbsp;&amp;nbsp;Dim sql As String&lt;br&gt;
&amp;nbsp;&amp;nbsp;sql = String.Format("Select * From {0} Where {1} = @key", Me.TableName, Me.PrimaryKeyField)&lt;br&gt;
&amp;nbsp;&amp;nbsp;Using cmd As New SqlCommand()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cmd.CommandText = sql&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cmd.Parameters.AddWithValue("@key",key).SqlDbType = SqlDbType.int&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cmd.CommandTimeOut = 60 ' Time out in seconds...pull from a global property or something&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Me.FillDataTable(cmd)&lt;br&gt;
&amp;nbsp;&amp;nbsp;End Using&lt;br&gt;
End Sub[/codesnippet]&lt;br&gt;
&lt;br&gt;
There may be a way to set the timeout for a BusinessLayer also, but this might work (haven't tried it myself).</description><pubDate>Tue, 30 Dec 2008 13:35:31 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21361.aspx</link><description>I guess I should have said that the clients that are having the timeout issue are on a T1 line remote from the SQL server and that the line is used by several users. This timeout occurs&amp;nbsp; based on the T1 load at the time. Hope this helps explain a little better.</description><pubDate>Tue, 30 Dec 2008 12:57:03 GMT</pubDate><dc:creator>Kenneth Langley</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21360.aspx</link><description>I'm not sure how to change the time out, but I'm suspicious that something else is going on.  I've never had a time out except when I had a connection problem.  I.e. only if I couldn't access the server....in which case more time isn't going to help.  You many have already done this, but I'd check that your connection string is OK, that you have access to the server, that sort of thing.  Most of my users are remote, sometimes with horrible connections.  Rarely is there a time out, especially on a FillByPrimaryKey, which usually is using a clustered index.    &lt;br&gt;
&lt;br&gt;
I'll be interested to know about how to set the timeout too!  :D</description><pubDate>Tue, 30 Dec 2008 12:21:35 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost21359.aspx</link><description>How do you set the sql command timeout on SF built in calls such as FillbyPrimaryKey. We are using these commands and getting a timeout. Is there a global setting that SF will use for the SF system generated calls?</description><pubDate>Tue, 30 Dec 2008 11:58:32 GMT</pubDate><dc:creator>Kenneth Langley</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16297.aspx</link><description>Thanks.&amp;nbsp; Took me a minute to make the right connection from the command to the BO.&amp;nbsp; Here is my revised code:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ADUserBO&lt;/FONT&gt;&lt;FONT size=2&gt; mADUser = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ADUserBO&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; mPartNum = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;.Empty;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (PartNumCBE.SelectedValue != &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mPartNum = (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;)PartNumCBE.SelectedValue;&lt;BR&gt;}&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlCommand&lt;/FONT&gt;&lt;FONT size=2&gt; cmd = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlCommand&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"spx_GetRunningInventory_FinishedGoods"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;cmd.CommandTimeout = 0;&lt;BR&gt;cmd.Parameters.AddWithValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@partnum"&lt;/FONT&gt;&lt;FONT size=2&gt;, mPartNum).SqlDbType = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlDbType&lt;/FONT&gt;&lt;FONT size=2&gt;.VarChar;&lt;BR&gt;cmd.Parameters.AddWithValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@div"&lt;/FONT&gt;&lt;FONT size=2&gt;, mADUser.LocationIndex).SqlDbType = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlDbType&lt;/FONT&gt;&lt;FONT size=2&gt;.Int;&lt;BR&gt;cmd.Parameters.AddWithValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@invdate"&lt;/FONT&gt;&lt;FONT size=2&gt;, InvDateDE.DateTime.ToShortDateString()).SqlDbType = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlDbType&lt;/FONT&gt;&lt;FONT size=2&gt;.VarChar;&lt;BR&gt;cmd.CommandType = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;CommandType&lt;/FONT&gt;&lt;FONT size=2&gt;.StoredProcedure;&lt;BR&gt;rawMaterialValuationBO1.FillDataTable(cmd);&lt;BR&gt;gridView1.Columns[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"CurrQty"&lt;/FONT&gt;&lt;FONT size=2&gt;].FilterInfo = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; DevExpress.XtraGrid.Columns.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ColumnFilterInfo&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"CurrQty &amp;gt; 0"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;gridView1.ApplyColumnsFilter();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Works great!&amp;nbsp; Thanks a bunch.&amp;nbsp; Oh...and the wait &amp;#119;indow...awefully nice feature!!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Now, I just need to work on getting that sproc to run faster than 90 seconds.&amp;nbsp; It has several nested CASE statements that I think are gumming up the works.&amp;nbsp; Not too sure how to simplify those conversions that are going on.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Happy Friday!&lt;BR&gt;Bill&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Fri, 09 May 2008 11:06:20 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16293.aspx</link><description>[quote]If the command timeout can be set, how do I do that from the BO?[/quote]&lt;/P&gt;&lt;P&gt;Through a command:&lt;/P&gt;&lt;P&gt;[codesnippet]'-- Establish Locals&lt;BR&gt;Dim cmd As New SqlCommand("MyStoredSproc")&lt;/P&gt;&lt;P&gt;'-- Never time out&lt;BR&gt;cmd.CommandTimeout = 0&lt;/P&gt;&lt;P&gt;'-- Set the parms&lt;BR&gt;cmd.Parameters.AddWithValue("@Parm1", 1).SqlDbType = SqlDbType.Int&lt;/P&gt;&lt;P&gt;'-- Set the command type&lt;BR&gt;cmd.CommandType = CommandType.StoredProcedure&lt;/P&gt;&lt;P&gt;'-- Execute the command&lt;BR&gt;Me.ExecuteNonQuery(cmd)[/codesnippet]</description><pubDate>Fri, 09 May 2008 09:52:02 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16288.aspx</link><description>Thanks Paul and Edhy!!&lt;/P&gt;&lt;P&gt;I am still using SQL Server 2000...I will see if I can find a corresponding configuration for setting the timeout.&lt;/P&gt;&lt;P&gt;Here is my code that I use for retrieving the data:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; mPartNum = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;.Empty;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (PartNumCBE.SelectedValue != &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mPartNum = (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;)PartNumCBE.SelectedValue;&lt;BR&gt;}&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT size=2&gt; mItemCode = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@partnum"&lt;/FONT&gt;&lt;FONT size=2&gt;, mPartNum);&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ADUserBO&lt;/FONT&gt;&lt;FONT size=2&gt; mADUser = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ADUserBO&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT size=2&gt; mDiv = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@div"&lt;/FONT&gt;&lt;FONT size=2&gt;, mADUser.LocationIndex);&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT size=2&gt; mInvDate = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@invdate"&lt;/FONT&gt;&lt;FONT size=2&gt;, InvDateDE.DateTime.ToShortDateString());&lt;BR&gt;rawMaterialValuationBO1.FillByStoredProcedure(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"spx_GetRunningInventory_FinishedGoods"&lt;/FONT&gt;&lt;FONT size=2&gt;, mItemCode, mDiv, mInvDate);&lt;BR&gt;gridView1.Columns[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"CurrQty"&lt;/FONT&gt;&lt;FONT size=2&gt;].FilterInfo = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; DevExpress.XtraGrid.Columns.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ColumnFilterInfo&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"CurrQty &amp;gt; 0"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;gridView1.ApplyColumnsFilter();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;If the command timeout can be set, how do I do that from the BO?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Thanks,&lt;BR&gt;Bill&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Fri, 09 May 2008 09:36:04 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16283.aspx</link><description>Yeah, Paul&amp;nbsp;nailed it on the last post.&amp;nbsp; The most common timeout that is overlooked is on the command itself.&amp;nbsp; 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.&amp;nbsp; So if you set the command timeout you should be good to go! :)</description><pubDate>Fri, 09 May 2008 09:24:01 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16277.aspx</link><description>Bill,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; loCommand &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; SqlCommand()&lt;/P&gt;&lt;P&gt;loCommand.CommandTimeout = 150&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Build the Query&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loCommand.CommandText = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"SELECT * FROM WHATEVER"&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Fri, 09 May 2008 07:38:43 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16276.aspx</link><description>Bill,&lt;/P&gt;&lt;P&gt;You can set the remote query timeout&amp;nbsp;on the server, I had to change this when&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/e87ea597-7846-4d6a-b47d-1f79.png"&gt;</description><pubDate>Fri, 09 May 2008 07:18:03 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16274.aspx</link><description>Hi Bill,&lt;/P&gt;&lt;P&gt;I found a thread that may give you an idea about using a separate thread for your query.&amp;nbsp; Check it here: &lt;A href="http://forum.strataframe.net/FindPost11979.aspx"&gt;http://forum.strataframe.net/FindPost11979.aspx&lt;/A&gt;</description><pubDate>Thu, 08 May 2008 22:18:34 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16271.aspx</link><description>Here is the error:&lt;/P&gt;&lt;P&gt;"Timeout expired.&amp;nbsp; The timeout period elapsed prior to completion of the operation or the server is not responding."&lt;/P&gt;&lt;P&gt;My query has been timed at about 90 seconds.&amp;nbsp; What can I do to get StrataFrame to increase this timeout?&lt;/P&gt;&lt;P&gt;Thanks!!</description><pubDate>Thu, 08 May 2008 18:50:19 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Increase Connection Timeout</title><link>http://forum.strataframe.net/FindPost16269.aspx</link><description>Perhaps I should have title this thread: Increase Query Timeout</description><pubDate>Thu, 08 May 2008 18:33:18 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item></channel></rss>