Hi Ashkar,
All u want to do can be done using Session Variable or using Session Component from "Data Access" Page, which is available whenever you user DBTables unit in your unit uses clause.
below is simple piece of code which can be used to first check if BDE alias exists, if not then create new BDE alias
for Access DataBase.
//Code
if not Session.IsAlias('MyAlias') then
begin
try
DriverList := TStringList.Create;
DriverList.Add('DATABASE NAME= DRIVE:/PATH/DATABASE.MDB');
DriverList.Add('USER NAME = UserName');
Session.AddAlias('MyAlias','MSACCESS',DriverList);
finally
DriverList.Free;
end;
end;
and define DriverList as
var
DriverList : TStrings;
Hope it will help you.