So, I have this code:
And I seem to have an issue with the final parameter, @start_date. I get the error:
But I need that value passed in as a date so I can use it as a date for restricting future queries. I include adovbs.inc adn every other sproc I use works fine (but I have none that pass dates to the server). Am I using an old outdated adovbs.inc file? Am I misusing the datatype somehow? In SQL Server it is a datetime type. If it matters, I am running against a SQL 2k database.
Thanks,
Willie
Code:
Dim cmd
SET cmd = server.CreateObject("ADODB.Command")
with cmd
.ActiveConnection = conn
.CommandText = "ycmhome.sp_addevent"
.CommandType = adCmdStoredProc
' Input parameters
.Parameters.Append .createparameter("@ministry_id", adInteger, adParamInput, , ministry_id)
.Parameters.Append .createparameter("@event_order", adInteger, adParamInput, , event_order)
.Parameters.Append .createparameter("@event_Status", adTinyInt, adParamInput, , event_Status)
.Parameters.Append .createparameter("@event", adVarChar, adParamInput, 50, eventname)
.Parameters.Append .createparameter("@sub_event", adVarChar, adParamInput, 50, sub_event)
.Parameters.Append .createparameter("@event_date", adVarChar, adParamInput, 50, event_date)
.Parameters.Append .createparameter("@cost", adVarChar, adParamInput, 10, cost)
.Parameters.Append .createparameter("@deposit_cost", adVarChar, adParamInput, 10, deposit_cost)
.Parameters.Append .createparameter("@group_cost", adVarChar, adParamInput, 10, group_cost)
.Parameters.Append .createparameter("@group_deposit_cost", adVarChar, adParamInput, 10, group_deposit_cost)
.Parameters.Append .createparameter("@space_available", adInteger, adParamInput, , space_available)
.Parameters.Append .createparameter("@pricing_id", adInteger, adParamInput, , pricing_id)
.Parameters.Append .createparameter("@min_group", adInteger, adParamInput, , min_group)
.Parameters.Append .createparameter("@max_group", adInteger, adParamInput, , max_group)
.Parameters.Append .createparameter("@survey", adTinyInt, adParamInput, , survey)
.Parameters.Append .createparameter("@event_year", adVarChar, adParamInput, 4, event_year)
.Parameters.Append .createparameter("@start_date", adDate, adParamInput, , start_date)
'Execute the function
.Execute, , adExecuteNoRecords
end with
And I seem to have an issue with the final parameter, @start_date. I get the error:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
[Microsoft][ODBC SQL Server Driver]Optional feature not implemented
But I need that value passed in as a date so I can use it as a date for restricting future queries. I include adovbs.inc adn every other sproc I use works fine (but I have none that pass dates to the server). Am I using an old outdated adovbs.inc file? Am I misusing the datatype somehow? In SQL Server it is a datetime type. If it matters, I am running against a SQL 2k database.
Thanks,
Willie