| New...Access Database from Delphi | |||||||||||||||||
| 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 join two tables with referential integrity, .... 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 ADOX to see how set up an empty MS Access database from "nothing".
ADOX 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.
To use ADOX in Delphi, you should establish a reference to the ADOX type library. 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.
aboutdelphi.mdb ![]() Next page > Create Database from Delphi > Page 1, 2 DB Course Next Chapter >> |
|||||||||||||||||


