This topic is locked

SQL Stored Procedure Multiple Parameters not working

4/29/2011 4:13:24 PM
ASPRunnerPro General questions
B
beachldy author

I've tried calling a SQL Stored Proc that has 2 parameters. I've tested it in SQL and it works. However, I put the following code below in

two places and it does NOT work.

  1. A button on the EDIT form (server code)and
  2. On the EDIT page (after update)

dbConnection.Execute "Exec SP_GetCustInfo '" & values("SchID","CustID") & "'"


It doesn't work.

Sergey Kornilov admin 4/29/2011

This code doesn't make much sense. The best idea is to print SQL query on the page first to see if it looks right.
Try this:

dbConnection.Execute "Exec SP_GetCustInfo " & values("SchID") & "," & values("CustID")
B
beachldy author 4/29/2011

Thanks. That works on the form "after update", but using the button on the Edit form does not produce the change. Usually, in VB, I'd write code to refresh the screen after doing a SQL update. What code needs to be added to get the updated fields once the Stored Proc from SQL runs?

Sergey Kornilov admin 4/30/2011

You can add the following code to ClientAfter button event to reload the page:

location.reload();