VB6, DAO, Oracle and dates....
Date: 26 Jul 2002 03:11:00 -0700
Message-ID: <d5bd14e9.0207260211.74528b4f_at_posting.google.com>
I have an Oracle 8.1 database and using the oracle 7.3.4 client (there
is a good reason and can't be avoided). I have a VB6 project that uses
DAO and need to get some queries working that have a where clause on
the date fields. The date fields in the database have a time stamp
which in this case I do not need to take into consideration. In
SQLPlus I can run the following query and get the results I expect.
Select * from ……… where to_date(My_Date_Field,'DDMM/YY') =
to_date('13/6/2002' ,'DD/MM/YY');
Problem is I can not use this syntax in the query definition, every
time I try and return my record set with this query definition I get
the following error:
Is there any thing I am missing, I am hoping that its going to be so
simple. I have seen a few workarounds for formatting the parameter (ie
right hand side of equals) but I need to convert the field being
returned (ie left).
Cheers
Error Code: 3085
Description: Undefined function 'to_date' in expression.
I have two possible ways round this but both require large changes in
the code and/or environment, they are to create a view that converts
the date, or to change the odbc drivers etc, both of which are not
ideal.