M_Take_Start_Date.Date 和M_Take_End_Date.Date 进行比较 为什么代码执行到第一步就提示请选择正确时间'.我想不明白
M_Take_Start_Date.Date 是2010-8-11 M_Take_End_Date.Date是2010-8-11
代码如下
if(M_Take_Start_Date.Date > M_Take_End_Date.Date ) then
begin
Application.MessageBox('请选择正确时间','提示',MB_OK);
abort;
end
else if(M_Take_Start_Date.Date = M_Take_End_Date.Date ) then
begin
if(M_Take_Start_Time.Time >= M_Take_End_Time.Time ) then
begin
Application.MessageBox('请选择正确时间','提示',MB_OK);
abort;
end
else
begin
V_Sql := 'insert into Take_Medicine_Rule values(Medicine_ID_Seq.currval,'''+V_Rule_Seq+''','''+V_Take_Start_Time+''','''+
V_Take_End_Time+''','''+V_Add_HP_Value+''','''+V_Valid_Flag+''','''+V_Note+''')';
end;
end