Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODC recordsource property prob

Status
Not open for further replies.

gust1480

Programmer
Mar 19, 2002
148
PH
Can somebody please tell me how to query my ORACLE tables by selecting the current date on the table and placing the script to the recordsource property of my ADODC..recordsource doesn't recognize a function like sysdate....was trying this script...
select * from orders where date = sysdate
but it doesn't work. pls help.
 
The Date() function in VB will produce the current system date

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
You probably want the records for the current day, but SYSDATE yields the complete timestamp, with granularity of seconds.

Supposing that your 'date' field also contains timestamp values (BTW is it really named 'date'? This seems to be a reserved datatype keyword) you can change your query as follows:

select * from orders where TRUNC(date) = TRUNC(sysdate)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top