导出
if savedialog1.Execute then
begin
if FileExists(savedialog1.filename+'.xml') then
begin
if messagedlg(' 该文件已经存在,是否替换?',mtinformation,[mbYes, mbNo],0)=mrYes then
adoquery1.SaveToFile(savedialog1.FileName+'.xml',pfXML);
end
else
adoquery1.SaveToFile(savedialog1.FileName+'.xml',pfXML);
end;导入(不过不是导入到数据库,只是通过感知控件显示数据)
if opendialog1.Execute then
try
adoquery1.LoadFromFile(opendialog1.filename);
except
showmessage('Error');
end;
if savedialog1.Execute then
begin
if FileExists(savedialog1.filename+'.xml') then
begin
if messagedlg(' 该文件已经存在,是否替换?',mtinformation,[mbYes, mbNo],0)=mrYes then
adoquery1.SaveToFile(savedialog1.FileName+'.xml',pfXML);
end
else
adoquery1.SaveToFile(savedialog1.FileName+'.xml',pfXML);
end;导入(不过不是导入到数据库,只是通过感知控件显示数据)
if opendialog1.Execute then
try
adoquery1.LoadFromFile(opendialog1.filename);
except
showmessage('Error');
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货