Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Having a timeout problem

Reply
Thread Tools

Having a timeout problem

 
 
tfs
Guest
Posts: n/a
 
      07-12-2004
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.

 
Reply With Quote
 
 
 
 
Bobby Ryzhy
Guest
Posts: n/a
 
      07-13-2004
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, http://www.velocityreviews.com/forums/(E-Mail Removed)-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
 
Reply With Quote
 
 
 
 
Thomas Scheiderich
Guest
Posts: n/a
 
      07-13-2004
"Bobby Ryzhy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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, (E-Mail Removed)-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



 
Reply With Quote
 
Bobby Ryzhy
Guest
Posts: n/a
 
      07-14-2004
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" <(E-Mail Removed)> wrote:

>"Bobby Ryzhy" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed).. .
>> 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, (E-Mail Removed)-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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having trouble with download link - CGI Timeout Jozef ASP General 0 11-15-2005 02:55 PM
Having trouble with download link - CGI Timeout Jozef ASP .Net 0 11-15-2005 03:25 AM
Timeout::timeout and Socket timeout Mark Probert Ruby 1 10-06-2004 09:30 AM
web.config session timeout and forms authentication timeout Do ASP .Net 2 11-23-2003 02:27 PM
Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Bob Johnson ASP .Net 0 08-07-2003 12:52 PM



Advertisments