I have figured how to run a stored proc in VB.net from a ASP page
'Setup SQL Command'
'SqlHelper.ExecuteNonQuery(Stiletto.cnStrRMISAppName("Recall"), CommandType.StoredProcedure, "SP_RECALL_BUILD_TABLES_2")
Dim CMD As New SqlCommand("SP_RECALL_BUILD_TABLES_2")
Dim connection As New SqlConnection(Stiletto.cnStrRMISAppName("Recall Program"))
CMD.Connection = connection
CMD.CommandType = CommandType.StoredProcedure
Dim adapter As New SqlDataAdapter(CMD)
adapter.SelectCommand.CommandTimeout = 0
'Fill the dataset'
Dim DS As New DataSet
adapter.Fill(DS)
connection.Close()
This takes about 4 mins to run. this works well but my asp page is timing out. What I would like is to display a gif like this one while it runs, then go to a finished page
but I am not sure how best to achieve that
vagas
0 Points
1 Post
Running a Stored procedure in ASP
Jun 12, 2012 01:21 PM|LINK
Please can someone help.
I have figured how to run a stored proc in VB.net from a ASP page
'Setup SQL Command' 'SqlHelper.ExecuteNonQuery(Stiletto.cnStrRMISAppName("Recall"), CommandType.StoredProcedure, "SP_RECALL_BUILD_TABLES_2") Dim CMD As New SqlCommand("SP_RECALL_BUILD_TABLES_2") Dim connection As New SqlConnection(Stiletto.cnStrRMISAppName("Recall Program")) CMD.Connection = connection CMD.CommandType = CommandType.StoredProcedure Dim adapter As New SqlDataAdapter(CMD) adapter.SelectCommand.CommandTimeout = 0 'Fill the dataset' Dim DS As New DataSet adapter.Fill(DS) connection.Close()This takes about 4 mins to run.
this works well but my asp page is timing out. What I would like is to display a gif like this one while it runs, then go to a finished page but I am not sure how best to achieve that
would anyone be able to help
paul
tjaank
Contributor
6688 Points
1204 Posts
Re: Running a Stored procedure in ASP
Jun 12, 2012 01:28 PM|LINK
refer to this:
http://www.macronimous.com/resources/stored_procedures_for_ASP_and_VB_Programmers.asp
Please Mark as Answer if this post helps you!
MahadTECH
Star
8976 Points
1659 Posts
Re: Running a Stored procedure in ASP
Jun 12, 2012 04:52 PM|LINK
oh.. don't you think its a long time?
Please share your Code.. why its taking 4 min? it should take maximum 4seconds
you will have to use UpdatePanel. and ContentTempalte and Trigger Image to achieve this goal..
if you want me to tell you about UpdatePanel Please reply.. and Share your Code. why its taking too much time? like 4 min omg its so long..
Good luck` Paul
Mahad Bin Mukhtar
Remember to Mark the replies as Answers
The easiest day was 'yesterday'.
MCP, MCSD
For .NET TECH Blog