Diamond Access Diamond ADO TMetadata About Timur Links Home Next Product
Welcome to the online home of Diamond Access
MS Access 97 Diamond Access
News Overview Downloads Registration Q&A Support Customer Impressions
 
Islamov.com  

Check out these great books about DAO

cover This book covered the most I've seen on DAO...
 
I have used this book many times when I knew that DAO could do the job, but, I needed a little bit more background info than just the syntax...
cover An excellent introduction to sound database design theory and how to execute it with Access...
 
It is so rare to find a book like this. It was exactly what I was searching for and had the information I needed...
cover All the basics, and quite a few of the advanced concepts are here...
 
For someone who want to simply learn how to get around Access, this book just MIGHT be appropriate...

Questions and Answers

The following is a list of frequently asked questions and answers regarding Diamond Access.
I hope this will help you to better integrate Diamond Access into your applications.

  1. How to install DAO 3.6 manually?
  2. How to install DAO 3.5 manually?
  3. How to compact/repair a database with Diamond Access?
  4. How to create a database with Diamond Access?
  5. How to install the Infopower Support for Diamond Access?
  6. How to add/delete users/groups using Diamond Access?


 
You need the following files to install DAO 3.6:
 
File name Description Location Register
DAO360.DLL MS DAO 3.6 Object Library C:\Program Files\Common Files\Microsoft Shared\DAO\ yes
MSEXCH40.DLL MS Jet Exchange Isam C:\Windows\System\ yes
MSEXCL40.DLL MS Jet Excel Isam C:\Windows\System\ yes
MSJET40.DLL MS Jet Engine Library C:\Windows\System\ yes
MSJINT40.DLL MS Jet Database Engine International DLL C:\Windows\System\
MSJTER40.DLL MS Jet Database Engine Error DLL C:\Windows\System\
MSJTES40.DLL MS Jet Expression Service C:\Windows\System\ yes
MSJTOR40.DLL MS OLE DB Provider for Jet C:\Windows\System\ yes
MSLTUS40.DLL MS Jet Lotus 1-2-3 Isam C:\Windows\System\ yes
MSPBDE40.DLL MS Jet Paradox Isam C:\Windows\System\ yes
MSRCLR40.DLL MS Jet Briefcase Reconciler Library C:\Windows\System\ yes
MSRD2X40.DLL MS RED ISAM C:\Windows\System\ yes
MSRD3X40.DLL MS Red ISAM C:\Windows\System\ yes
MSRECR40.DLL MS Jet Briefcase Reconciler Resource Library C:\Windows\System\
MSREPL40.DLL MS Replication Library C:\Windows\System\
MSRPJT40.DLL MS Replication Provider for Jet C:\Windows\System\ yes
MSTEXT40.DLL MS Jet Text ISAM C:\Windows\System\ yes
MSVCRT.DLL MS C Runtime Library C:\Windows\System\
MSVCRT40.DLL MS C Runtime Library C:\Windows\System\
MSWDAT10.DLL MS Jet Sort Tables C:\Windows\System\
MSWSTR10.DLL MS Jet Sort Library C:\Windows\System\
MSXBDE40.DLL MS Jet xBase Isam C:\Windows\System\ yes
VBAJET32.DLL VB for Application Development Environment - Expression Service Loader C:\Windows\System\

Step by step installation of DAO 3.6.

  1. Copy all DAO core files and required additional data formats DLLs to the Windows system folder, except DAO360.DLL. Windows 95 system folder is Windows\System\ and Windows NT system folder is Windows\System32\.
  2. Copy DAO360.DLL to the common files directory. Common files directory location can be found in registry at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion in CommonFilesDir string value. To get full destination path append Microsoft Shared\DAO to value of CommonFilesDir. The destination path should be like C:\Program Files\Common Files\Microsoft Shared\DAO\.
  3. Register the DLLs, that needs to be registered (see Table). DAO360.DLL should be registered at the end. Registration can be done with regsvr32.exe, which is located in Windows\System.
    For example: C:\Windows\System\regsvr32.exe msjet40.dll

After finishing above procedures you will have correct DAO 3.6 installation.

NOTE: Diamond Access does not contain distribution license for Microsoft Jet and Microsoft DAO. You must own a Microsoft product, which allows to distribute DAO.
 
 


 
You need the following files to install DAO 3.5:
 
File name Location
DAO350.DLL C:\Program Files\Common Files\Microsoft Shared\DAO\
DAO2535.TLB C:\Program Files\Common Files\Microsoft Shared\DAO\
MSJET35.DLL C:\Windows\System\
MSREPL35.DLL C:\Windows\System\
MSJTER35.DLL C:\Windows\System\
MSJINT35.DLL C:\Windows\System\
VBAJET32.DLL C:\Windows\System\
VBAR332.DLL C:\Windows\System\
VBAEN32.OLB C:\Windows\System\
MSVCRT40.DLL C:\Windows\System\
MSVCRT.DLL C:\Windows\System\
MSVCIRT.DLL C:\Windows\System\

Step by step installation of DAO 3.5.

  1. Copy all DAO core files and required additional data formats DLLs to the Windows system folder, except DAO350.DLL and DAO2535.TLB. Windows 95 system folder is Windows\System\ and Windows NT system folder is Windows\System32\.
  2. Copy DAO350.DLL and DAO2535.TLB to the common files directory. Common files directory location can be found in registry at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion in CommonFilesDir string value. To get full destination path append Microsoft Shared\DAO to value of CommonFilesDir. The destination path should be like C:\Program Files\Common Files\Microsoft Shared\DAO\.
  3. Register all DLLs, which have DllRegisterServer function. DAO350.DLL should be registered at the end. Registration can be done with regsvr32.exe, which is located in Windows\System.
    For example: C:\Windows\System\regsvr32.exe msjet35.dll

After finishing above procedures you will have correct DAO 3.5 installation.

NOTE: Diamond Access does not contain distribution license for Microsoft Jet and Microsoft DAO. You must own a Microsoft product, which allows to distribute DAO.
 
 


uses DAODatabase;

 procedure TForm1.btnRepairClick (Sender: TObject);
begin
  //__DBEngine35 object only created automatically if there are some opened TDAODatabases
  //otherwise you should create __DBEngine in code

  if __DBEngine35 = nil then CreateEngine (Dao35, '');
  __DBEngine35.RepairDatabase ('D:\demo.mdb');

end;

procedure TForm1.btnCompactClick (Sender: TObject);
begin
  if __DBEngine35 = nil then CreateEngine (Dao35, '');
  __DBEngine35.CompactDatabase ('D:\demo.mdb', 'D:\compacted.mdb', '', 0, '');

end;

 
uses DAODatabase, DAOTlb;
 
procedure TForm1.btnCreateDatabaseClick (Sender: TObject);
var
  db: Database;
  td: TableDef;
  idx: Index;
  fld: Field;

begin
  if __DBEngine36 = nil then CreateEngine (Dao36, '');
  db := __DBEngine36.CreateDatabase ('D:\newdb.mdb', ';LANGID=0x0409;CP=1252;COUNTRY=0', 0);
  td := db.CreateTableDef ('Orders', 0, '', '');
  fld := td.CreateField ('Order_ID', dbLong, 0);
  fld.Attributes := dbAutoIncrField;
  td.Fields.Append (fld);
  td.Fields.Append (td.CreateField ('Order_DATE', dbDate, 0));
  td.Fields.Append (td.CreateField ('Order_CLIENT', dbText, 50));
  td.Fields.Append (td.CreateField ('Order_TOTAL', dbCurrency, 0));
  idx := td.CreateIndex ('Primary');
  idx.Primary := True;
  idx.Fields.Append (idx.CreateField ('Order_ID', dbLong, 0));
  td.Indexes.Append (idx);
  idx := td.CreateIndex ('By_Client');
  idx.Fields.Append (idx.CreateField ('Order_CLIENT', dbText, 50));
  td.Indexes.Append (idx);
  db.TableDefs.Append (td);
  db.Close;

end;

5. How to install the Infopower Support for Diamond Access?

I assume, that you already have Diamond Access and InfoPower 4.x installed.

  1. You need to download the Infopower Support unit for Diamond Access;
  2. Open ip40d_d4Trial.dpk package from Lib directory of the Infopower;
  3. Add DAOInfoPower.pas into the Contains section and Diamond4.dcp into the Requires section;
  4. Change 'Build Control' option in the Project Options/Description form to 'Rebuild as needed';
  5. Compile the package. You should see the new components TwwDAOTable, TwwDAOQuery, TwwDAOQueryDef, TwwDAOMasterDetailTable in IP Access page of the Component Pallette;
  6. Copy ip40d_d4Trial.bpl into Windows\System directory.

This is a code from the Security Demo project.
 
procedure TfrmMain.btnListUsersClick(Sender: TObject);
var
  Wsp: Workspace;
  i: Integer;

begin
  Wsp := __DBEngine35.Workspaces [0]; //get default Workspace
  listUsers.Clear;
  for i := 0 to Wsp.Users.Count - 1 do
  begin
    listUsers.Items.Add (Wsp.Users [i].Name);
  end;
  listGroups.Clear;
  for i := 0 to Wsp.Groups.Count - 1 do
  begin
    listGroups.Items.Add (Wsp.Groups [i].Name);
  end;
end;
 
procedure TfrmMain.btnCreateNewUserClick(Sender: TObject);
var
  Wsp: Workspace;
  Usr: User;

begin
  Wsp := __DBEngine35.Workspaces [0]; //get default Workspace
  Usr := Wsp.CreateUser ('New user', 'PID123', 'zztop');
  Wsp.Users.Append (Usr);
  btnListUsersClick (Self);

end;
 
procedure TfrmMain.btnDeleteUserClick(Sender: TObject);
var
  Wsp: Workspace;
begin
  Wsp := __DBEngine35.Workspaces [0]; //get default Workspace
  Wsp.Users.Delete (listUsers.Items [listUsers.ItemIndex]);
  btnListUsersClick (Self);

end;
 
procedure TfrmMain.btnCreateNewGroupClick(Sender: TObject);
var
  Wsp: Workspace;
  Grp: Group;
begin
  Wsp := __DBEngine35.Workspaces [0]; //get default Workspace
  Grp := Wsp.CreateGroup ('New group', 'PIDGROUP123');
  Wsp.Groups.Append (Grp);
  btnListUsersClick (Self);

end;
 
procedure TfrmMain.btnDeleteGroupClick(Sender: TObject);
var
  Wsp: Workspace;
begin
  Wsp := __DBEngine35.Workspaces [0]; //get default Workspace
  Wsp.Groups.Delete (listGroups.Items [listGroups.ItemIndex]);
  btnListUsersClick (Self);

end;

If you have an additional questions, not listed here, please go to Support.
 
 

  Top