procedure Tdm.DataModuleCreate(Sender: TObject); begin try FDConnection1.Connected := False; FDConnection1.Params.Database := ExtractFileDir(ParamStr(0)) + 'mdb' + 'code.mdb'; FDConnection1.Connected := True; //FDConnection1.Close; //FDConnection1.Connected:=True; except on E: Exception do begin Tip.Show('提示',e.Message); end; end; end;