We have written the following query which returns records in Oracle but when the same query is executed through VB6.0, it returns 0 records.
Select *
from crdh
where expdate between (TO_DATE('03-Dec-2002','DD-MON-YYYY'))
and (TO_DATE('31-Dec-2012','DD-MON-YYYY'))
and CS = 'AA'
Can anyone help?
Assuming the
where andin your question is just a typo and not really part of your query, the reason for your problem might be a NLS issue; the “MON” part your your format string is culture dependend. You might be able to solve that by setting the language in the environment, but IMO it’s perferable to use language-independend numerical month formats instead, i.e.