actually i want to create a reminder for user in my system. i managed tp create a reminder date (nextMaintDate). But now i want to compare the date today with nextMaintDate, if its found to be the same, the data will out into listview that i create. i already do the coding but there is problem with my query..this is my coding:
date = DateTime.Today;
string query = "SELECT equipmentName FROM equipment WHERE nextMaintDate >= date;
**help me please, im begineer user. but im try to do it...huhuhu
Loading
Binu SubiPosted Feb 17, 2006, 3:38 PM
date = DateTime.Today;
string query = "SELECT equipmentName FROM equipment WHERE nextMaintDate >= " + date.ToShortDateString();
And put a break point there, see what is in variable "query", may be take that query, paste it into your Sql Query Analyser (Or the db tool that you use), see whether you are getting data...
please don't forget that learning to debug your code is more important (or as important as) learning to code
take it easy!
Cheers