Solved

using MS Access in delphi

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 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