Relatively new to Delphi, but not to programming in general, I would
like to create a databas "from scratch" in my Delphi application. Now,
I've read the database tutorial that is on the web, which encourages me
to use ADOX and a line like
ADOXCatalog1.Create1(DataSource)
But, using Delphi 2005, I cannot seem to find out how to access the
ADOX package (or reference?) from inside my form. Can anyone help me
with that? Is it still possible in 2005?
Any advice would be appreciated!
Thank you,
greetings
Cat
Googling for "ADOX Delphi" reveals the following in first link:
==========================================================================
ADOX
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.
To use ADOX in Delphi, you should establish a reference to the ADOX type
library.
1. Select Project | Import Type Library
2. Choose "Microsoft ADO Ext 2.x for DDL and Security (Version 2.x)"
3a. Change "TTable" to "TADOXTable"
3b. Change "TColumn" to "TADOXColumn"
3c. Change "TIndex" to "TADOXIndex"
3d. Change "TKey" to "TADOXKey"
3e. Change "TGroup" to "TADOXGroup"
3f. Change "TUser" to "TADOXUser"
3g. Change "TCatalog" to "TADOXCatalog"
4. Press Install button (rebuilding packages)
5. Press OK once and Yes twice
6. File | Close All | Yes
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.
==========================================================================
The description "Select Project | Import Type Library" obviously does
not work anymore. Nor do the two import options offered (Component |
Install Component or Project | Add Reference) get me anywhere.
So far, all the advice I found to this topic has been pointing me to
just this one description, quoted again and again. I can imagine that
implementing the same thing in Delphi 2005 isn't much more complicated
- if one knows how. Therefore, can anyone tell me where the trick is?
Am I possibly starting out with the wrong kind of project? Im am given
a choice of VCL-Application for .NET or Windows-Application for .NET...
Greetings
C.