S
Shanti
Guest
I entered 04/25/2005 into the DisableDate field in my form and hit submit, it calls this code:
which calls this function:
calling this stored proc
It returns an error saying "Procedure 'sp_SetDisableDate' expects parameter '@disDate', which was not supplied.", but both of the response.writes for disDate print 04/25/2005. Is there something I'm not formatting right? Is it something to do with adDBTimeStamp? I've tried asDate and adDBDate, but they both return errors that the optional feature is not implemented.
Any help is most appreciated!!
Code:
dim disDate
if trim(Request.Form("DisableDate")) = "" then
disDate = NULL
else
disDate = Request.Form("DisableDate") ' will be in mm/dd/yyyy format
end if
Response.Write("DisableDate in ChangePassword: " & disDate)
RetCode = SetDisableDate(conn, disDate, PerUsrKey)
which calls this function:
Code:
Function SetDisableDate(conn, disDate, PerUsrKey)
Response.Write("<br>DisableDate in TIHFunctions: " & disDate)
Dim cmd
Set cmd = server.createobject("ADODB.Command")
cmd.CommandText = "sp_SetDisableDate"
cmd.ActiveConnection = conn
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("disDate", adDBTimeStamp, adParamInput)
cmd.Parameters.Append cmd.CreateParameter("PerUsrKey", adInteger, adParamInput)
cmd.Execute
Set cmd = Nothing
End Function
calling this stored proc
Code:
PROCEDURE [sp_SetDisableDate] @disDate DATETIME, @PerUsrKey INT
AS
BEGIN
UPDATE Users
SET UsrDisableDate = @disDate
WHERE UsrKey = @PerUsrKey
END
It returns an error saying "Procedure 'sp_SetDisableDate' expects parameter '@disDate', which was not supplied.", but both of the response.writes for disDate print 04/25/2005. Is there something I'm not formatting right? Is it something to do with adDBTimeStamp? I've tried asDate and adDBDate, but they both return errors that the optional feature is not implemented.
Any help is most appreciated!!