In my simple application I am trying to do this:
(Cn is my ADODB.Connection to Oracle)
[tt]recDate.Filter [/tt] line is creating an error 3001
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
I used Filter many times before and I know it has some problems with NULLs, but how should I use it with Date field? Is there a Filter trick with Date?
Google showed some samples/tricks with DateValue in Access, but I don't have it in Oracle. I even tried to covert the Date to Char (TO_CHAR) but still had the same error.
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
(Cn is my ADODB.Connection to Oracle)
Code:
Dim recDate As New ADODB.Recordset
strSQL = "SELECT MyDateField " & vbNewLine _
& " FROM MyTable " & vbNewLine _
& " ORDER BY MyDateField"
recDate.Open strSQL, Cn
[highlight #FCE94F]recDate.Filter = "MyDateField = TO_DATE('5/5/2015', 'MM/DD/YYYY')"[/highlight]
[tt]recDate.Filter [/tt] line is creating an error 3001
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
I used Filter many times before and I know it has some problems with NULLs, but how should I use it with Date field? Is there a Filter trick with Date?
Google showed some samples/tricks with DateValue in Access, but I don't have it in Oracle. I even tried to covert the Date to Char (TO_CHAR) but still had the same error.
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.