Hi i am a newbie to stored procedure i cant get this stored procedure to work see bellow VBscript and stored procedure.
Procedure or function usp_CatSectionUpdate has too many arguments specified the error line is on the .Execute ,,adExecuteNoRecords in the vbscript. i have printed the input on the screen and looks ok. can anyone help.
CREATE PROCEDURE [dbo].[usp_CatSectionUpdate]
@CategoryID int,
@SectionID int,
@SectionMask int
AS
SET NOCOUNT ON
UPDATE [tblCategories]
SET
[Section_ID] = @SectionID,
[Section_Mask] = @SectionMask
WHERE
[Category_ID] = @CategoryID AND SubCategory_ID = 0
GO
with cmd
.ActiveConnection = gConn
.CommandText = "usp_CatSectionUpdate"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("@RETURN_VALUE", adInteger, adParamReturnValue, 0)
.Parameters.Append .CreateParameter("@CategoryID", adInteger, adParamInput, 0)
.Parameters.Append .CreateParameter("@SectionID", adInteger, adParamInput, 0)
.Parameters.Append .CreateParameter("@SectionMask", adInteger, adParamInput, 0)
.Parameters("@CategoryID") = Cat_ID
.Parameters("@SectionID") = DefaultID_new
.Parameters("@SectionMask") = Mask_total_New
'response.write " " & Clng(Cat_ID) & " " & Clng(DefaultID_new) & " " & Clng(Mask_total_New) & "<br>"
.Execute ,,adExecuteNoRecords
end with
thanks angus
-Gus
-Gus
Procedure or function usp_CatSectionUpdate has too many arguments specified the error line is on the .Execute ,,adExecuteNoRecords in the vbscript. i have printed the input on the screen and looks ok. can anyone help.
CREATE PROCEDURE [dbo].[usp_CatSectionUpdate]
@CategoryID int,
@SectionID int,
@SectionMask int
AS
SET NOCOUNT ON
UPDATE [tblCategories]
SET
[Section_ID] = @SectionID,
[Section_Mask] = @SectionMask
WHERE
[Category_ID] = @CategoryID AND SubCategory_ID = 0
GO
with cmd
.ActiveConnection = gConn
.CommandText = "usp_CatSectionUpdate"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("@RETURN_VALUE", adInteger, adParamReturnValue, 0)
.Parameters.Append .CreateParameter("@CategoryID", adInteger, adParamInput, 0)
.Parameters.Append .CreateParameter("@SectionID", adInteger, adParamInput, 0)
.Parameters.Append .CreateParameter("@SectionMask", adInteger, adParamInput, 0)
.Parameters("@CategoryID") = Cat_ID
.Parameters("@SectionID") = DefaultID_new
.Parameters("@SectionMask") = Mask_total_New
'response.write " " & Clng(Cat_ID) & " " & Clng(DefaultID_new) & " " & Clng(Mask_total_New) & "<br>"
.Execute ,,adExecuteNoRecords
end with
thanks angus
-Gus
-Gus