Hi, I'm having trouble running my stored procedure. I'm using the Connection and Command objects in my .asp. I keep getting the following error"
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
In my ASP script, I've tried running it with just the one parameter being used in the stored proc and I've also tried it with both the stored proc parameter and a return value parameter. Neither worked
Below is my Stored Procedure and .asp scripts.
-----------------------------------
Stored Proc
-------------------------------------
CREATE procedure dbo.sp_user_delete
-- Inbound Parameters:
@INID T_PKFK --this is simply an integer value
as
set nocount on
begin transaction
delete from dbo.tbl_user_info
where
id = @inid
if @@error <> 0 begin
rollback transaction
return 103
end
commit transaction
return(0)
GO
-------------------------------
ASP Script
------------------------------
set conn = server.CreateObject ("ADODB.Connection"
Set cmdUpdate = Server.CreateObject("ADODB.Command"
conn.Open Application("Connection1_ConnectionString"
set cmdUpdate.ActiveConnection = conn
cmdUpdate.CommandText = "sp_user_delete"
cmdUpdate.CommandType = adCmdStoredProc
Set parValue = cmdUpdate.CreateParameter("ReturnValue", adInteger, adParamReturnValue)
cmdUpdate.Parameters.Append parValue
Set parValue = cmdUpdate.CreateParameter("INID", adInteger, adParamInput,4,2)
cmdUpdate.Parameters.Append parValue
cmdUpdate.Execute
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
In my ASP script, I've tried running it with just the one parameter being used in the stored proc and I've also tried it with both the stored proc parameter and a return value parameter. Neither worked
Below is my Stored Procedure and .asp scripts.
-----------------------------------
Stored Proc
-------------------------------------
CREATE procedure dbo.sp_user_delete
-- Inbound Parameters:
@INID T_PKFK --this is simply an integer value
as
set nocount on
begin transaction
delete from dbo.tbl_user_info
where
id = @inid
if @@error <> 0 begin
rollback transaction
return 103
end
commit transaction
return(0)
GO
-------------------------------
ASP Script
------------------------------
set conn = server.CreateObject ("ADODB.Connection"
Set cmdUpdate = Server.CreateObject("ADODB.Command"
conn.Open Application("Connection1_ConnectionString"
set cmdUpdate.ActiveConnection = conn
cmdUpdate.CommandText = "sp_user_delete"
cmdUpdate.CommandType = adCmdStoredProc
Set parValue = cmdUpdate.CreateParameter("ReturnValue", adInteger, adParamReturnValue)
cmdUpdate.Parameters.Append parValue
Set parValue = cmdUpdate.CreateParameter("INID", adInteger, adParamInput,4,2)
cmdUpdate.Parameters.Append parValue
cmdUpdate.Execute