Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

using MS Access in delphi

Posted on 2000-02-23
2
Medium Priority
?
411 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 150 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

927 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