Hi,
I haven't worked with ASP for a little while so I'm kind of rusty. Right now, I'm just trying to call a stored procedure from an ASP page. The procedure is only taking one argument and I'm just trying to pass it a hard-coded string.
I keep receiving a wrong number of arguments or arguments of invalid type error. I looked at my stored procedure and that seems correct. There is not going to be a middle tier with this app, so there's nothing there to look at.
I've pasted the code below. Can anyone tell me if they see anything wrong?
Thanks!
<%
Dim objRS, objComm, objParam, strFirstName, objConn, strConn
strConn = "Driver={SQL Server}; Server=(local); Database=DE; UID=sa; PWD=;"
set objComm = server.CreateObject("ADODB.Command"
objComm.ActiveConnection = strConn
objComm.CommandText = "sp_InsertCustomers"
objComm.CommandType = adCmdStoredProc
objComm.Parameters.Append objComm.CreateParameter
("@FirstName",adVarChar, adParamInput, 30, "Jim"
objComm.Execute
I haven't worked with ASP for a little while so I'm kind of rusty. Right now, I'm just trying to call a stored procedure from an ASP page. The procedure is only taking one argument and I'm just trying to pass it a hard-coded string.
I keep receiving a wrong number of arguments or arguments of invalid type error. I looked at my stored procedure and that seems correct. There is not going to be a middle tier with this app, so there's nothing there to look at.
I've pasted the code below. Can anyone tell me if they see anything wrong?
Thanks!
<%
Dim objRS, objComm, objParam, strFirstName, objConn, strConn
strConn = "Driver={SQL Server}; Server=(local); Database=DE; UID=sa; PWD=;"
set objComm = server.CreateObject("ADODB.Command"
objComm.ActiveConnection = strConn
objComm.CommandText = "sp_InsertCustomers"
objComm.CommandType = adCmdStoredProc
objComm.Parameters.Append objComm.CreateParameter
("@FirstName",adVarChar, adParamInput, 30, "Jim"
objComm.Execute