还是不能连接表:
我把相关的代码贴上来.
procedure TForm2.Button3Click(Sender: TObject);
begin
with form1.ADOQuery2,CheckListBox1do
begin
SQL.Clear;
SQL.Add('SELECT distinct xingming,bianhao,sheng,xian,nyear,nmouth,nday FROM exportable');
Prepared;
Open;
//////////////////////////////////
Clear;
First;
while not eofdo
begin
Items.Add(Format('编号[%s] 姓名[%s]',[Fields[0].AsString,Fields[2].AsString]));
Next;
end;
end;
end;
点botton3后checklistbox1就有了记录,对要打印的记录的进行勾选
然后再点你说的botton1,不能调出form4窗口,提示表连接错误