在ACCESS中对的,在BCB中不对,下面的代码哪里错了,郁闷啊! Query1->Close(); Query1->SQL->Clear(); Query1->SQL->Add("select * from 特快列车"); Query1->SQL->Add("where 起始站=1 and 发车时间>#1899-12-30 9:00#"); Query1->SQL->Add("order by 下站时间"); Query1->Prepare(); Query1->Open(); 提示错误:Query1:Field'00#' is of unknown type 请哪位大虾帮帮我吧,都憋了2天了!!!!!!!!!!!!!!!
----------------------------------------------
编译又有错,郁闷啊!!
Query1->SQL->Add("where 起始站="+IntToStr(start_city)+" and 发车时间>DateValue('1899-12-30 20:00')+TimeValue('1899-12-30 20:00')");是对的!!!!!
而Query1->SQL->Add("where 起始站="+IntToStr(start_city)+" and 发车时间>DateValue('"+DateTimeToStr(start_time)+"')+TimeValue('"+DateTimeToStr(start_time)+"')");却错了(检索结果为空),其中start_time为TDateTime的变量,帮我看看为啥呀?