Solved

using MS Access in delphi

Posted on 2000-02-23
2
394 Views
Last Modified: 2010-04-04
I would like to know how to use a database built in Access on a Delphi form
0
Comment
Question by:EddieChrisMurchoe
2 Comments
 

Accepted Solution

by:
perkley earned 50 total points
ID: 2571673
Use a component like Diamond Access, which will directly access the Microsoft Access database file, bypassing the BDE.  It gives it a lot more speed.

You can find Diamond Access at this URL:
http://www.islamov.com/diamond/

Question is do you know how to use other database files on a Delphi Form?  If so, this should make it a piece of cake.

The only problem, is if you need to distribute the file, then the computer it runs on needs to have the DAO installed.  If you purchase the Microsoft Developers CD, it comes with the runtime of Microsoft Access and the license to distribute the DAO.

This should answer your question, but if not, let me know.
0
 
LVL 17

Expert Comment

by:inthe
ID: 2574693
Hi
you dont need to use (and pay) for diamond components when you can use odbc for free instead :

Odbc:

1:   Open Control Panel, and then select ODBC DataSources (32bit) .
2:   When the Data Source Administrator appears, Click Add.
3:   find the one that says  Microsoft Access Driver (*.mdb)
     click it and click finish.
4:   A dialog will popup called ODBC Microsoft Access Setup
5:   in "data source name" edit box well call it "MyAccess"
6:   description well say is "tesing msaccess connection".
7:   click select and find your .mdb file click ok to select it.
8:   click "advanced" and make sure login name and password are blank.
9:   close advanced.
10:  close microsoft access setup dialog
11:  close the  Data Source Administrator.

delphi:

1:  start or restart delphi if its already running.
2:  start a new project
3:  drop a ttable,tdbgrid,tdatasource,tdatabase on form.

    in object inspector:

4:  datasource1 dataset : table1
5:  dbgrid datasource   : datasource1
6:  database1 aliasname : MyAccess  
7:  database1 databasename : MyAccessDB //type some name
8:  database1 loginprompt : false
9:  table1 databasename : MyAccessDB  //some name is now selectable
10: table1 tablename : select a table
11: database1 connected : true
12: table1 active : true

now carry on and do whatever as normally would for db..
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now