I'm trying to pass many input parameters to a SqlServer
SP from Ado in VBA for Excel. When i'm passing only first paramener everything's ok but while trying to pass two parameters i always get mesage:

Run - time error '2147217887' (80040e21)':
[Microsoft][ODBC SQL DRIVER] Optional feature not implemented

a bit of my code in VBA looks like that:

Set cmd = New ADODB.Command
With cmd
.ActiveConnection = conn
.CommandType = adCmdStoredProc
.CommandText = "nalezn"
Set param1 = .CreateParameter("customerrid", adInteger, adParamInput, , 10248)
.Parameters.Append param1
Set param2 = .CreateParameter("fromdate", adDate, adParamInput)
param2.Value = CDate("1/1/1997")
.Parameters.Append param2

in additonal:
first parameter in Stored procedure is INTEGER data type and the second one is DATETIME data type

thanks in advance for every help