Guest_imported
New member
- Jan 1, 1970
- 0
When i am doing a select using ADO on a date field
eg: StockRes.Open "Select * from myTable where date = " & d & ", cn, adOpenKeyset, adLockReadOnly
StockREs.close
suppose d is a date in exactly the same format as the one in the DB. However the select never gets any records (i know there are records in the DB applying to the criteria)I have also tried hardcoding it.
Could it be a format problem?Ado problem ? Or is there some other unknown problem with date?
The field in the DB is a date/time field.
If i convert the field to text it works.However this is undesireable.
Can u please help me!!!!thanx
eg: StockRes.Open "Select * from myTable where date = " & d & ", cn, adOpenKeyset, adLockReadOnly
StockREs.close
suppose d is a date in exactly the same format as the one in the DB. However the select never gets any records (i know there are records in the DB applying to the criteria)I have also tried hardcoding it.
Could it be a format problem?Ado problem ? Or is there some other unknown problem with date?
The field in the DB is a date/time field.
If i convert the field to text it works.However this is undesireable.
Can u please help me!!!!thanx