This topic is locked
[SOLVED]

 Add Button To Call Stored Procedure

3/30/2010 2:57:28 PM
ASPRunnerPro General questions
M
mgallo author

Using ASPRunner v6.1 (I do not want to upgrade), I want to add a button to the Menu Page that calls a stored procedure in SQL Server 2008. I can add the button using:
<SPAN class=buttonborder><INPUT class=button name=gfiles type=button value="Generate Files"></SPAN>
I have no idea what to do after this. Add an event? What event? Where? Indicate to the user that the procedure is running or when it's done? Etc.?
I'd prefer NOT to become an ASP/Script expert to do this simple function and I've looked though all the samples I could find but none apply.
TIA!

J
Jane 4/2/2010

Mike,
here is just a sample:

<SPAN class=buttonborder><INPUT class=button name=gfiles type=button value="Generate Files" onclick="menu.asp?par=1"></SPAN>


Then check request.querystring("par") in the Menu page: Before process event on the Eventstab and run your SQL here.

M
mgallo author 4/5/2010

I add the button:
<SPAN class=buttonborder><INPUT class=button onclick="menu.asp?par=1" type=button value="Generate Files" id=gfiles name=gfiles></SPAN>
and the code on the Menu Before Processed page:
If Request.Querystring("par") Then

dbConnection.Execute "Exec SaveTIO"

End If
but the procedure never gets called.
Any help is appreciated!

Sergey Kornilov admin 4/5/2010

It looks like your code is correct.
I recommend to upload your project to Demo Account and to contact support team directly in this regard.

M
mgallo author 4/6/2010

I could not upload to the Demo Account - got the following error:
Error. The operation could not be completed.
My login is correct because I can view my account.

Sergey Kornilov admin 4/6/2010

You need to contact support team directly in this regard sending your project files and database for investigation.

M
mgallo author 4/7/2010

Changing the onclick parameter as follows solves the problem:
onclick="location.href='menu.asp?par=1'"