procedure TForm1.FormShow(Sender: TObject); var s,Mypath:string; strlst:tstringlist; begin //配置数据 Mypath:=extractfilepath(application.exename); s:=mypath+'dataset.ini'; if fileexists(s) then begin strlst:=tstringlist.Create; strlst.LoadFromFile(s); s:=strlst.Text; end else begin s:='Provider=Microsoft.Jet.OLEDB.3.51;'+ 'Persist Security Info=False;'+ 'mode = share deny none;'+ 'Data Source=%sSQ_LX.mdb'; end; s:=format(s,[mypath]); try Qry_lx.ConnectionString:=s;