delphi代码如下:
 procedure TForm1.Edit1Change(Sender: TObject);
begin
 ADOQuery1.SQL.Text:='SELECT * FROM tstuinfo WHERE xuehao like '+QuotedStr(Edit1.Text)+'%';
 ADOQuery1.Open;
 if ADOQuery1.IsEmpty then
  begin
    ShowMessage('没有找到');
    Exit;
  end;
  ListBox1.Clear;
  while not ADOQuery1.Eof do
  begin
    ListBox1.Items.Add(ADOQuery1.FieldByName('xuehao').AsString);
    ADOQuery1.Next;
  end;
end;