这个代码哪错了?
完成功能是在数据库省份表里查出省份的记录,然后插到 Combobox 里,总是提示一个错误:
raised exception classic EOLeException with message,BOF 或 EOF 中有一个是真,或者当前的记录已删除,
所需的操作是一个当前的记录,哪位大侠帮我看看?
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select F_province from T_ZJK_SF'); //在省份表里查出省份记录;
Open;
end;
if ADOQuery1.RecordCount>0 then
while ADOQuery1.FindNext do
begin
ComboBox1.Items.Add(ADOQuery1.fieldbyname('F_Province').AsString);
ADOQuery1.Next;
end
else
ShowMessage('查询失败!');