D
Dooza
I have a stored procedure that needs to be executed via an ASP page.
The SP does a number of tasks, mainly comparing a local table against a
linked server table, and updating/inserting/deleting where necessary. It
does this on 4 tables, one of them being fairly large, which will keep
on growing.
I have constructed the ASP page, made an animated GIF for the fake
progress bar, and then inserted the command to run the SP.
I then check the return value and if its 0 the page is redirected to a
results page which shows a table.
When I run this page I don't get to see the animated gif, the page
pauses until the SP is complete and redirects direct to the results page.
How can I make the page load the animated gif first, and then once the
SP has run and is successful redirect?
<img src="progress.gif" width="150" height="150" />
<p>Please wait, upload in progress...</p>
<%
set cmUpload = Server.CreateObject("ADODB.Command")
cmUpload.ActiveConnection = MM_aclv4_STRING
cmUpload.CommandText = "dbo.updateWebshop"
cmUpload.Parameters.Append cmUpload.CreateParameter("@RETURN_VALUE", 3, 4,2)
cmUpload.CommandType = 4
cmUpload.CommandTimeout = 0
cmUpload.Prepared = true
cmUpload.Execute()
%>
<% If cmUpload.Parameters("@RETURN_VALUE") = 0 Then
Response.Redirect("results.asp")
Else%>
<p>Error Code: <%= cmUpload.Parameters("@RETURN_VALUE") %></p><% End if %>
The SP does a number of tasks, mainly comparing a local table against a
linked server table, and updating/inserting/deleting where necessary. It
does this on 4 tables, one of them being fairly large, which will keep
on growing.
I have constructed the ASP page, made an animated GIF for the fake
progress bar, and then inserted the command to run the SP.
I then check the return value and if its 0 the page is redirected to a
results page which shows a table.
When I run this page I don't get to see the animated gif, the page
pauses until the SP is complete and redirects direct to the results page.
How can I make the page load the animated gif first, and then once the
SP has run and is successful redirect?
<img src="progress.gif" width="150" height="150" />
<p>Please wait, upload in progress...</p>
<%
set cmUpload = Server.CreateObject("ADODB.Command")
cmUpload.ActiveConnection = MM_aclv4_STRING
cmUpload.CommandText = "dbo.updateWebshop"
cmUpload.Parameters.Append cmUpload.CreateParameter("@RETURN_VALUE", 3, 4,2)
cmUpload.CommandType = 4
cmUpload.CommandTimeout = 0
cmUpload.Prepared = true
cmUpload.Execute()
%>
<% If cmUpload.Parameters("@RETURN_VALUE") = 0 Then
Response.Redirect("results.asp")
Else%>
<p>Error Code: <%= cmUpload.Parameters("@RETURN_VALUE") %></p><% End if %>