View Single Post
  #2 (permalink)  
Old July 19th, 2007, 04:31 PM
vhrao vhrao is offline
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I also tried another way to build date string from date fields:

int month = calDateFrom.SelectedDate.Month;
int day = calDateFrom.SelectedDate.Day;
int year = calDateFrom.SelectedDate.Year;
string sdate = month+"/"+day+"/"+year;
month = calDateTo.SelectedDate.Month;
day = calDateTo.SelectedDate.Day;
year = calDateTo.SelectedDate.Year;
string edate = month+"/"+day+"/"+year;

Then build sql string:
mySelectQuery = "SELECT * from Training.trschedules_view where STARTDATE >= " + sdate + " and ENDDATE <= " + edate;

Now I get error:
ORA-00932: inconsistent datatypes

Can someone help?

Reply With Quote