sql.Add('Select * From MRMF_ConsumerInfo where '+'YHBianHao like :P_1 and '+
'YHXingMing like :P_2 and '+
'YHDianHua like :P_3 and '+
'YHDJRiQi >= :P_4_0 and YHDJRiQi <= :P_4_1 '+
' order by YHBianHao ');
Application.MessageBox('select完成!','提示',MB_OK);
if (strID <> '') then
ADOQuery.Parameters.ParamByName('P_1').value :='%'+edtNo.text+'%'
else
ADOQuery.Parameters.ParamByName('P_1').value:='%';
Application.MessageBox('完成1!','提示',MB_OK);
if (strName <> '') then
ADOQuery.Parameters.ParamByName('P_2').value :='%'+edtName.Text+'%'
else
ADOQuery.Parameters.ParamByName('P_2').value :='%';
Application.MessageBox('完成2!','提示',MB_OK);
if (strTel <> '') then
ADOQuery.Parameters.ParamByName('P_3').value :='%'+edtPhone.Text+'%'
else
ADOQuery.Parameters.ParamByName('P_3').value :='%';
Application.MessageBox('完成3!','提示',MB_OK);
if (strStart <> '') and (strEnd <> '') then
ADOQuery.Parameters.ParamByName('P_4_0').value :=strStart;
ADOQuery.Parameters.ParamByName('P_4_1').value :=strEnd;
Application.MessageBox('完成4!','提示',MB_OK);
try open; except exit; end;
Application.MessageBox('完成4222!','提示',MB_OK);
大家帮我看看这段代码有什么问题,display打到‘完成4!’就结束了,下面的‘完成4222!’打不出来,谢谢了