views:

1358

answers:

4

I'm looking for a Delphi component / library to open and read from an mdb (MS Access) database. I will not be writing to the db or displaying the data; just need to read the db using whatever sql Access supports.

This is for a personal side-project (programming is not my paying job), so I need a free or a very inexpensive solution that works with any of Delphi 6, Delphi 2007 or Delphi 2009 (Professional editions all). Performance doesn't matter, simplicity does :)

+1  A: 

Have you considered just using ODBC to connect to it?

JohnFx
A: 

Have you considered using MS Access to write to Delphi?

Walter Mitty
Isn't this the opposite of the problem he is trying to solve?
JohnFx
And Access is a programming environment but Delphi is not a database.
David-W-Fenton
The comment doesn't really make sense
MexicanHacker
+5  A: 

I use ADO components included with Delphi for this ("Microsoft Jet 4.0 OLE Provider"). It requires MDAC installed on client, which is already included in XP and newer systems.

vrad
+10  A: 

hi, check this out http://www.teachitza.com/delphi/databasehowto.htm it is realy simple and easy task with 5-10 line of code. that was very usefull for me when i needed to just read some data from ms access files.

for starting u can use simple connection string like this

    DataSource := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + Filename +
    ';Persist Security Info=False';

  ADOConnection1.ConnectionString := DataSource;
  ADOConnection1.LoginPrompt := False;
  ADOConnection1.Connected := true;

  // ADOConnection1.GetTableNames(listbox1.items);

  AdoTable1.ReadOnly := false; //if u want to make changes
  ADOTable1.active := false;
  ADOTable1.TableName := 'B2777'; //table name
  ADOTable1.active := true;

filnename is ur mdb file path+name. that is what i use for very simple tasks.

avar