qry.Close;
qry.SQL.Clear;
qry.SQL.Add('select * from newinv where cCreatePerson='''+trim(edtapply.Text)+'''');
qry.Open;
application.MessageBox(PChar(trim(edtapply.Text)+'共有'+inttoStr(qry.RecordCount) +'条申请记录!'),'提示',mb_ok or mb_iconInformation);
qry.First;请帮忙看一下吧,看看有没有错。我往文本框里输入人员名点查询,本来数据库中有数据,怎么查不出来。谢谢!
qry.SQL.Clear;
qry.SQL.Add('select * from newinv where cCreatePerson='''+trim(edtapply.Text)+'''');
qry.Open;
application.MessageBox(PChar(trim(edtapply.Text)+'共有'+inttoStr(qry.RecordCount) +'条申请记录!'),'提示',mb_ok or mb_iconInformation);
qry.First;请帮忙看一下吧,看看有没有错。我往文本框里输入人员名点查询,本来数据库中有数据,怎么查不出来。谢谢!
检测一下它的值,然后就查询分析器执行,看看行不行就可以了
qry.SQL.Clear;
qry.SQL.Add('select * from newinv where cCreatePerson like '''+trim(edtapply.Text)+'''');
qry.Open;