F
formiss
Unregistered / Unconfirmed
GUEST, unregistred user!
ADOCon_Eng: TADOConnection;procedure TForm1.Button1Click(Sender: TObject);var ConStr: string;begin ConStr := ExtractFilePath(Application.ExeName) + 'openenglish.mdb'; ADOCon_Eng.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + ConStr + ';' +'Jet OLEDBatabase Password=DZDSoft;Persist Security Info=true'; Memo1.Lines.Clear; try try ADOCon_Eng.Connected := true; Memo1.Lines.Add('用 Provider=Microsoft.Jet.OLEDB.4.0 连接方式,数据库连接成功!'); except on e: exception do begin Memo1.Lines.Add('用 Provider=Microsoft.Jet.OLEDB.4.0 连接方式,出现错误:'+ e.Message); end; end; finally ADOCon_Eng.Close; end;end;