Link to home
Start Free TrialLog in
Avatar of Jerry N
Jerry NFlag for United States of America

asked on

Converting Access string to DBTYPE_DATE

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.

I dim:
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
  cPW.Parameters.Append aPNames(iCount)
  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?
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jerry N

ASKER

Either one does work - Thanks!!!!!