Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error: Optional Feature Not Implemented. 1

Status
Not open for further replies.

LochDhu

Technical User
Jul 12, 2001
76
0
0
US
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



 
The value you have hard coded, whats the date format you have used?

Try this, note i have used adChar instead of adDate

Parameters.Append .CreateParameter("@StartDate", adChar, adParamInput, 10, Format(StartDate , "yyyy/mm/dd"))

OR

When you pass the date values better format it to
Format(StartDate , "yyyy/mm/dd")

did this help u?

dbtech
 
dbtech,

Nice call! That works great!

Than you very much.

Scott
 
IS this a bug/feature in MDAC 2.7 do you know? We are now experiencing this same problem on an existing application that works under MDAC 2.5. Since installing .NET and MDAC 2.7 we are now getting this error message on a stored procedure with datetime parameters.

Can anyone shed any light on this please?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top