Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Parameters to a stored procedure

Status
Not open for further replies.

Mayoor

Programmer
Joined
Jan 16, 2004
Messages
198
Location
GB
Im trying to execute the following section of code

If Request.QueryString("mode") = "update" then

Dim AvailableOption
For Each AvailableOption in Request.Form
If Request.form(AvailableOption) <> 0 then
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.ConnectionString = Application("oConStr")
myConn.Open

myConn.Execute "usp_UpdateRptGrpPrimDel " & AvailableOption & "," & Request.form(AvailableOption)
'Response.Write("usp_UpdateRptGrpPrimDel " & AvailableOption & "," & Request.form("AvailableOption"))
myConn.Close
End If
Next

End If

this then is supposed to be passing paramenters to this stored procedure.

CREATE PROCEDURE usp_UpdateRptGrpPrimDel

@lngRptGrpID int,
@strEMPID_PrimDel nvarchar(10)

AS

UPDATE tbl_RptGrps SET
strEMPID_PrimDel = @strEMPID_PrimDel
WHERE lngRptGrpID = @lngRptGrpID

GO


However when I check the database the change is not being made.

Can Anyone help!?
 
One suggestion (assuming you are using SQL server), would be to go into query analyzer, paste the string you are trying to execute, and see what happens.

If it works from SQL server, we have a problem on the ASP side, and some sample data would be helpful for us.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top