Page 1: Delphi, ADOX and ADOExpress against MS Access.
Chapter 11 of this course (Free Delphi Database Course for Beginners - focus on ADO techniques) featured the ADOCommand component which is most often used for executing data definition language (DDL) SQL commands. We've presented a way of porting your existing Paradox/BDE tables to MS Access. However few questions have stayed unanswered: how to create an empty Access database, how to add an index to an existing table, how to referential integrity,
More of this Feature
• Page 2: Create.Database
Join the Discussion
"Post your views and comments to this chapter of the free Delphi database Programming Course" Discuss!
Many of the attendees of this course have complained that they do not have MS Access installed on their computer - and are unable to create a sample database (aboutdelphi.mdb) that is presented in the first chapter and used through this course.
In this chapter, we'll again focus on the TADOCommand and the
Game Programming Graphics Internet/Intranet Mathematics Multimedia Delphi Pascal/IDE Screen saver dev. VCL Using VCL Write/Enhance Web Services Windows/Shell/API Kylix (D on Linux)
Coding standards Books/Publications Dev. Utilities FAQs/Tips/Tricks Free Code Projects Humor and Fun Icons and Glyphs Jobs and Offers Training/CD/Video VCL & Tools
All articles on this topic
ADOX to see how set up an empty MS Access database from "nothing".
As stated in the mentioned chapter, ADO Extensions for Data Definition Language and Security is an extension to the ADO objects and programming model. ADOX gives developers a rich set of tools for gaining access to the structure, security model, and procedures stored in a database.
Even though ADOX is part of ADO, Delphi does not wrap it inside ADOExpress. To use ADOX with Delphi, you should establish a reference to the ADOX type library. The description of the ADOX library is "Microsoft ADO Ext. for DDL and Security." The ADOX library file name is Msadox.dll. You'll have to import the ADOX library into the IDE.
This process creates a ADOX_TLB.pas unit and places its name in the uses clause of the current project. The process also places 7 new components on the ActiveX page of the component palette. It is very important to change the class names as described in step 3. If you omit that part Delphi will complain that class TTable is already defined - this is because the VCL already has the BDE version of TTable component.
Before we move on, you should recall that our sample aboutdelphi.mdb database has three tables: Application, Authors and Types. Both Authors and Types are child tables to Applications. Both Authors and Types have a primary index.
Subscribe to our newsletter.
> Free Credit Report
> Free Psychics
Next page > Create Database from Delphi > Page 1, 2
DB Course Next Chapter >>
>> Charting with Databases
All graphics (if any) in this feature created by Zarko Gajic.
Messing with the creation process of a form object, or how to change the default style of a window when it gets created to suit your particular needs.
Stay informed with all new and interesting things about Delphi (for free).
Subscribe to the About Programming Newsletter
Name Email subscribe
Got some code to share? Got a question? Need some help?
Join these forum conversations
Extracting digital audio from cd Delphi disadvantages compared to VS.Net Keep An Application Always On Top Delphi7 adoblob problem Searching in a text file or wide string
Email this page!
Was this article helpful?