Hello all,
That is the error message I am getting when trying to run a SQL2000 Stored Procedure via an ADO Command Object. The SP runs fine without a date comparison, as soon as I add the date comparison I get the error message.
I created two paramters for the ADO Command for the start & end dates.
.Parameters.Append cmd.CreateParameter("@Tech", adVarChar, adParamInput, 25)
.Parameters.Append cmd.CreateParameter("@StartDate", adDate, adParamInput)
.Parameters.Append cmd.CreateParameter("@EndDate", adDate, adParamInput)
.Parameters.Append cmd.CreateParameter("@NonProduct", adDouble, adParamOutput, 5)
I set them = to the DateTime Picker values.
SP:
CREATE PROCEDURE GetTechData (
@Tech varchar(25),
@StartDate datetime,
@EndDate datetime,
@NonProduct real OUTPUT)
AS
/*****Non Product Training*****/
SELECT @NonProduct = SUM(SERVICETIME) FROM TIMECARDENTRIES
WHERE (EMPLOYEEUSERNAME = @Tech)
AND (SERVICEDATE BETWEEN @StartDate AND @EndDate)
Does anyone know what the error message is referring to? I can't find any answers in MSDN. I have also hardcoded in the Paramters values with #4/1/30# & '4/1/30' and still get the error message.
The error is occurring when the execute method is reached at the command object.
Thanks
That is the error message I am getting when trying to run a SQL2000 Stored Procedure via an ADO Command Object. The SP runs fine without a date comparison, as soon as I add the date comparison I get the error message.
I created two paramters for the ADO Command for the start & end dates.
.Parameters.Append cmd.CreateParameter("@Tech", adVarChar, adParamInput, 25)
.Parameters.Append cmd.CreateParameter("@StartDate", adDate, adParamInput)
.Parameters.Append cmd.CreateParameter("@EndDate", adDate, adParamInput)
.Parameters.Append cmd.CreateParameter("@NonProduct", adDouble, adParamOutput, 5)
I set them = to the DateTime Picker values.
SP:
CREATE PROCEDURE GetTechData (
@Tech varchar(25),
@StartDate datetime,
@EndDate datetime,
@NonProduct real OUTPUT)
AS
/*****Non Product Training*****/
SELECT @NonProduct = SUM(SERVICETIME) FROM TIMECARDENTRIES
WHERE (EMPLOYEEUSERNAME = @Tech)
AND (SERVICEDATE BETWEEN @StartDate AND @EndDate)
Does anyone know what the error message is referring to? I can't find any answers in MSDN. I have also hardcoded in the Paramters values with #4/1/30# & '4/1/30' and still get the error message.
The error is occurring when the execute method is reached at the command object.
Thanks