|
Set conn=createobject("adodb.connection")
Set rs=createobject("adodb.recordset")
Set comm=createobject("adodb.command")
conn.open= "Provider=SQLOLEDB.1;Persist Security Info=False;server=10.197.0.20;uid=sa;pwd=sa;database=eCorps2006;version=2000;"
comm.ActiveConnection=conn
comm.CommandType=2
comm.CommandText="CheckDutyStat"
'定义存储过程的参数
Set EmployeeID=comm.CreateParameter("@employeeid",adVarChar,adParamInput,40," ")
comm.Parameters.Append EmployeeID
comm.Parameters.Append comm.CreateParameter("@branchid",adVarChar,adParamInput,40,breachid)//breachid前面已经付值
comm.Parameters.Append comm.CreateParameter("@starttime",adDateTime,adParamInput,now)
comm.Parameters.Append comm.CreateParameter("@endtime",adDateTime,adParamInput,now)rs=comm.Execute()
黑体字这段代码定义存储过程参数老提示"参数类型不匹配",不知道错哪里了,请各位指教哈! |
|