Converting Access string to DBTYPE_DATE
Posted on 2013-09-13
I'm using Access 2010 and have a routine that sends parameters to an Oracle procedure.
It works great for strings (adChar) and Numbers(adDouble) but I'm trying to send it a date.
I think it needs a DBTYPE_DATE.
Dim cPW As New ADODB.Command
Dim aPNames() As ADODB.Parameter
Then I set the "core":
Set aPNames(iCount) = cPW.CreateParameter(, adDBDate, adParamInput)
Then I get to the point where I assign the value
aPNames(iCount).Value = aParam(iCount, 3)
aParam is a string array. Aparam(iCount,3) is "20110501".
I get the error:
Application uses a value of the wrong type for the operation
What do I need to send it and how do I get there?