T
tfs
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.ConfigurationSettings.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.
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.ConfigurationSettings.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.