02-09-2013, 01:18 AM
السلام عليكم
هذا مثال
وعدل فيه مايلزم
ضعه في الحدث OnCreate
هذا مثال
وعدل فيه مايلزم
ضعه في الحدث OnCreate
كود :
procedure TForm1.FormCreate(Sender: TObject);
var
Conn, DB: string;
begin
DB := ExtractFilePath(Application.ExeName) + 'db.mdb';
Conn := 'Provider=Microsoft.Jet.OLEDB.4.0;' +
'Data Source=' + DB + ';' +
'Persist Security Info=False;' +
'Mode=Share Deny None;Extended Properties="";';
Adoconnection1.LoginPrompt := False;
Adoconnection1.ConnectionString := Conn;
Adoconnection1.Open;
Adotable1.Connection := Adoconnection1;
Adotable1.TableName := 'Table1';
ADOTable1.Open;
end;
