This topic is locked

Create Button To Call Stored Procedure

2/4/2010 2:00:56 PM
ASPRunnerPro General questions
M
mgallo author

I searched the forum and read a few posts that provided some info but not enough detail for an ASP & ASPRunner newbie.
I created a bogus Report page and modified the Print button as shown here, but now I'm stuck:
{BEGIN print_link}<SPAN class=buttonborder><INPUT class=button type=button onclick="" value="Create File" ></SPAN>{END print_link}&nbsp;
I'd like the onclick event to call the stored procedure. No paramters need to be passed in and none are returned.
BTW a beginners guide to ASPRunner would be helpful if anyone has a link.

Sergey Kornilov admin 2/4/2010

I recommend to check this article for inspiration:

http://xlinesoft.com/asprunnerpro/docs/email_selected_records.htm
You can also check ASPRunnerPro 6.2 that comes with handy 'Insert Button' feature:

http://www.asprunner.com/forums/topic/13378-asprunnerpro62phprunner52-beta-is-available-for-download/

M
mgallo author 2/5/2010

I installed 6.2b, inserted a button and added this line to the Client Before function (shown with generic names):
dbConnection.Execute "EXEC [MyDatabase].[dbo].[MyStoredProcedure]"
but it does not call the procedure.
Any ideas would be appreciated!

Sergey Kornilov admin 2/5/2010

You doing it right.
If this doesn't work for you open a ticket at http://support.xlinesoft.com sending your project file along with script that creates tables and stored procedures in SQL Server for investigation.

C
clig 2/8/2010



I installed 6.2b, inserted a button and added this line to the Client Before function (shown with generic names):
dbConnection.Execute "EXEC [MyDatabase].[dbo].[MyStoredProcedure]"
but it does not call the procedure.
Any ideas would be appreciated!


Does the username in your connection string have execute rights on that SP?

W
wisdom2009 2/8/2010

I had the same issue before. I fixed by giving the username permission to execute the procedure.

M
mgallo author 2/10/2010

Yes, the permission is set correctly.
Unfortunately due to other issues, I've had to go back to v6.1, so debugging this is on hold.