Solved

using MS Access in delphi

Posted on 2000-02-23
2
387 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 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

12 Experts available now in Live!

Get 1:1 Help Now