Hi everyone,
I'm trying to implement a Prepared Statement using an MS Access 2000 from a
ASP page. and I'm receiving the following error message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
[Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
Basically, I have two arrays, that are values to be inserted into an Access
table so I defined them as parameters in my SQL statement, because it's
faster using this instead of one SQL statement per every array value. Here a
piece of the code:
Set cmd = Server.CreateObject("ADODB.command")
cmd.ActiveConnection = conn
cmd.CommandType = adCmdText
cmd.CommandText = "INSERT INTO tblUnavailable (LeaveID,LeaveHrs) VALUES (?,
?);"
cmd.TimeOut = 30
cmd.Prepared = True
Set prm1 = cmd.CreateParameter("vLeaveType", adBigInt, adParamInput, 4 )
cmd.parameters.Append prm1
Set prm2 = cmd.CreateParameter("vLeaveHrs", adDouble, adParamInput, 8 )
cmd.parameters.Append prm2
For i = 0 TO UBound(vLeaveType)
if vLeaveHrs(i) <> 0 Then
cmd("vLeaveType") = vLeaveType(i)
cmd("vLeaveHrs") = vLeaveHrs(i)
cmd.execute
End if
Next
I've never used these Prepared Statements object, so I don't know what is
causing the problem.
Can someone give me a hand with this and tell me what is wrong.
Thanks,
Francisco