Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Having a timeout problem (http://www.velocityreviews.com/forums/t82557-having-a-timeout-problem.html)

tfs 07-12-2004 11:03 PM

Having a timeout problem
 
I have a page that is running a DTS package and takes anywhere from 1
minute to 20 minutes. When it comes back it displays in my textbox
the results.

The problem is that on the long packages, the page times out after
about 30 seconds.

What is the best way to display a now processing ticker and prevent
the page from timing out?

Here is a snippet of the code I am running:

Dim objConnect as SqlConnection = new
SqlConnection(System.Configuration.ConfigurationSe ttings.AppSettings("MM_CONNECTION_STRING_Contour_S erver"))

objConnect.Open()

sqlString = "exec master.dbo.xp_cmdshell 'dtsrun /S " &
chr(34) & "OPENWORX" & chr(34)
& " /N " & chr(34) &
request.QueryString("name") & chr(34)
& " /E '"

Dim objCommand as SqlCommand = new SqlCommand(sqlString,
objConnect)
Dim objDataReader as SqlDataReader = objCommand.ExecuteReader( _
CommandBehavior.CloseConnection)

dim ktr as integer
ktr = 0
while (objDataReader.Read() = true)
if(objDataReader(0) is System.DBNull.value) then
sResults = ""
else
sResults = objDataReader(0)
end if

results.text = results.text & sResults & vbCrLf
ktr = ktr + 1
end while

results.text = results.text & "at end of loop ktr = "
& ktr & vbCrLf
objDataReader.Close()
objCommand.Dispose()
objConnect.Close()


The code sits at the ExecuteReader until the DTS Package is done.

Thanks,

Tom.


Bobby Ryzhy 07-13-2004 06:53 PM

Re: Having a timeout problem
 
The DTS package needs to be started from an assyncronous process. One that starts it and returns to the page an immediate result. The page
then need to poll the process for progress (basically refreshing itself every 5 seconds or so).

Bobby Ryzhy
bobby@ domain below
http://weekendtech.net


On 12 Jul 2004 18:03:29 -0500, tfs@dslextreme-dot-com.no-spam.invalid (tfs) wrote:

>I have a page that is running a DTS package and takes anywhere from 1
>minute to 20 minutes. When it comes back it displays in my textbox
>the results.
>
>The problem is that on the long packages, the page times out after
>about 30 seconds.
>
>What is the best way to display a now processing ticker and prevent
>the page from timing out?
>
>Here is a snippet of the code I am running:
>
>Dim objConnect as SqlConnection = new
>SqlConnection(System.Configuration.ConfigurationS ettings.AppSettings("MM_CONNECTION_STRING_Contour_ Server"))
>
>objConnect.Open()
>
>sqlString = "exec master.dbo.xp_cmdshell 'dtsrun /S " &
>chr(34) & "OPENWORX" & chr(34)
>& " /N " & chr(34) &
>request.QueryString("name") & chr(34)
>& " /E '"
>
>Dim objCommand as SqlCommand = new SqlCommand(sqlString,
>objConnect)
>Dim objDataReader as SqlDataReader = objCommand.ExecuteReader( _
> CommandBehavior.CloseConnection)
>
>dim ktr as integer
>ktr = 0
>while (objDataReader.Read() = true)
> if(objDataReader(0) is System.DBNull.value) then
> sResults = ""
> else
> sResults = objDataReader(0)
> end if
>
> results.text = results.text & sResults & vbCrLf
> ktr = ktr + 1
>end while
>
>results.text = results.text & "at end of loop ktr = "
>& ktr & vbCrLf
>objDataReader.Close()
>objCommand.Dispose()
>objConnect.Close()
>
>
>The code sits at the ExecuteReader until the DTS Package is done.
>
>Thanks,
>
>Tom.


Bobby Ryzhy
bobby @ domain below
http://weekendtech.net

Thomas Scheiderich 07-13-2004 11:36 PM

Re: Having a timeout problem
 
"Bobby Ryzhy" <bobby@weekendtech.net> wrote in message
news:rqb8f0pfth9eq15lch3ituoma2fufrv0j2@4ax.com...
> The DTS package needs to be started from an assyncronous process. One

that starts it and returns to the page an immediate result. The page
> then need to poll the process for progress (basically refreshing itself

every 5 seconds or so).

How would I do that? I assume that is not what I am doing now?

Tom.


>
> Bobby Ryzhy
> bobby@ domain below
> http://weekendtech.net
>
>
> On 12 Jul 2004 18:03:29 -0500, tfs@dslextreme-dot-com.no-spam.invalid

(tfs) wrote:
>
> >I have a page that is running a DTS package and takes anywhere from 1
> >minute to 20 minutes. When it comes back it displays in my textbox
> >the results.
> >
> >The problem is that on the long packages, the page times out after
> >about 30 seconds.
> >
> >What is the best way to display a now processing ticker and prevent
> >the page from timing out?
> >
> >Here is a snippet of the code I am running:
> >
> >Dim objConnect as SqlConnection = new

>
>SqlConnection(System.Configuration.ConfigurationS ettings.AppSettings("MM_CO

NNECTION_STRING_Contour_Server"))
> >
> >objConnect.Open()
> >
> >sqlString = "exec master.dbo.xp_cmdshell 'dtsrun /S " &
> >chr(34) & "OPENWORX" & chr(34)
> >& " /N " & chr(34) &
> >request.QueryString("name") & chr(34)
> >& " /E '"
> >
> >Dim objCommand as SqlCommand = new SqlCommand(sqlString,
> >objConnect)
> >Dim objDataReader as SqlDataReader = objCommand.ExecuteReader( _
> > CommandBehavior.CloseConnection)
> >
> >dim ktr as integer
> >ktr = 0
> >while (objDataReader.Read() = true)
> > if(objDataReader(0) is System.DBNull.value) then
> > sResults = ""
> > else
> > sResults = objDataReader(0)
> > end if
> >
> > results.text = results.text & sResults & vbCrLf
> > ktr = ktr + 1
> >end while
> >
> >results.text = results.text & "at end of loop ktr = "
> >& ktr & vbCrLf
> >objDataReader.Close()
> >objCommand.Dispose()
> >objConnect.Close()
> >
> >
> >The code sits at the ExecuteReader until the DTS Package is done.
> >
> >Thanks,
> >
> >Tom.

>
> Bobby Ryzhy
> bobby @ domain below
> http://weekendtech.net




Bobby Ryzhy 07-14-2004 02:46 PM

Re: Having a timeout problem
 
go to groups.google.com and type in asyncronous webservice.

Bobby Ryzhy
bobby@ domain below
http://weekendtech.net

On Tue, 13 Jul 2004 16:36:07 -0700, "Thomas Scheiderich" <tfs@deltanet.com> wrote:

>"Bobby Ryzhy" <bobby@weekendtech.net> wrote in message
>news:rqb8f0pfth9eq15lch3ituoma2fufrv0j2@4ax.com.. .
>> The DTS package needs to be started from an assyncronous process. One

>that starts it and returns to the page an immediate result. The page
>> then need to poll the process for progress (basically refreshing itself

>every 5 seconds or so).
>
>How would I do that? I assume that is not what I am doing now?
>
>Tom.
>
>
>>
>> Bobby Ryzhy
>> bobby@ domain below
>> http://weekendtech.net
>>
>>
>> On 12 Jul 2004 18:03:29 -0500, tfs@dslextreme-dot-com.no-spam.invalid

>(tfs) wrote:
>>
>> >I have a page that is running a DTS package and takes anywhere from 1
>> >minute to 20 minutes. When it comes back it displays in my textbox
>> >the results.
>> >
>> >The problem is that on the long packages, the page times out after
>> >about 30 seconds.
>> >
>> >What is the best way to display a now processing ticker and prevent
>> >the page from timing out?
>> >
>> >Here is a snippet of the code I am running:
>> >
>> >Dim objConnect as SqlConnection = new

>>
>>SqlConnection(System.Configuration.Configuration Settings.AppSettings("MM_CO

>NNECTION_STRING_Contour_Server"))
>> >
>> >objConnect.Open()
>> >
>> >sqlString = "exec master.dbo.xp_cmdshell 'dtsrun /S " &
>> >chr(34) & "OPENWORX" & chr(34)
>> >& " /N " & chr(34) &
>> >request.QueryString("name") & chr(34)
>> >& " /E '"
>> >
>> >Dim objCommand as SqlCommand = new SqlCommand(sqlString,
>> >objConnect)
>> >Dim objDataReader as SqlDataReader = objCommand.ExecuteReader( _
>> > CommandBehavior.CloseConnection)
>> >
>> >dim ktr as integer
>> >ktr = 0
>> >while (objDataReader.Read() = true)
>> > if(objDataReader(0) is System.DBNull.value) then
>> > sResults = ""
>> > else
>> > sResults = objDataReader(0)
>> > end if
>> >
>> > results.text = results.text & sResults & vbCrLf
>> > ktr = ktr + 1
>> >end while
>> >
>> >results.text = results.text & "at end of loop ktr = "
>> >& ktr & vbCrLf
>> >objDataReader.Close()
>> >objCommand.Dispose()
>> >objConnect.Close()
>> >
>> >
>> >The code sits at the ExecuteReader until the DTS Package is done.
>> >
>> >Thanks,
>> >
>> >Tom.

>>
>> Bobby Ryzhy
>> bobby @ domain below
>> http://weekendtech.net

>


Bobby Ryzhy
bobby @ domain below
http://weekendtech.net


All times are GMT. The time now is 05:06 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.