| Access / SQL Server Database Explorer with full Delphi source code | |||||||||||||||||
| The ADPDBExplorer (About Delphi Programming Database Explorer) application allows you to connect to a Microsoft Access (MDB) database and/or SQL Server / MSDE database to explore a database structure, insert, edit or delete data. | |||||||||||||||||
The ADPDBExplorer (About Delphi Programming Database Explorer) application allows you to connect to a Microsoft Access (MDB) database and/or SQL Server / MSDE database to explore a database structure, insert, edit or delete data. Features also include running "free-hand" queries (select, insert, update, etc.) against the database using a simple query builder. A simple master-details relationships builder allows displaying and operating on joined tables. This application is build on the grounds of the "Database Programming Course". The source code provides an excellent introduction to the dbGo (ADO) object model in Delphi database applications. ADPDBExplorer Connecting to a databaseADPDBExplorer can connect to and manage MS Access and MS SQL Server databases.The "Open Access (MDB)" menu item (from the Database main menu) is used to bring up an "Open file" type of dialog that lets a user pick a MDB database to operate on. The "Open SQL Server" item calls a custom connection dialog for a SQL server database (mimics the standard Windows OLE DB Data Link Properties dialog). The explanation of the code used can be found in the article: "Enumerating SQL Servers, Retrieving databases from a SQL Server" ADPDBExplorer provides a most recently used list (MRU) of the databases accessed. The MRU list allows for quick selection of an Access database that was recently opened without having to select an Open menu item and search to locate a specific lately accessed database. The free source TadpMRU component is used. Note: the MRU list only stores recently used MDB (Access) databases.
Examining table dataWhen you connect to a database, a tree view will be populated with all table names from the active database. To open a table in "edit" mode, simply click on a table name. A form opens hosting a DBNavigator and a DBGrid ready to be used to insert, edit, delete or move through table records.
Master-Detail and "Free-hand" QueriesBy selecting the "Query" item from the "Misc" tree view group, a new form will be created enabling you to specify and execute any valid SQL statement (either returning a dataset or just executing an UPDATE statement, for example).Note: while you can execute DDL statements (like CREATE TABLE), ADPDBExplorer was not designed to be used to alter the structure of tables (views, stored procedures, etc.). The "Master-Detail" item opens a more complex form where you can specify what fields from two tables form a master-detail relationship. Here's an example:
Free (source) downloadADPDBExplorer is an operational application, however, there are many areas where it can be improved. You can download the full source code to learn and enhance the application with your ideas, or simply download the executable version if you are in "hurry" and have an Access or SQL Server database you need to operate on (no installation is required, simply run the ADPDBExplorer.EXE file).Paradox, DBase, mySQL, myDatabase?
| |||||||||||||||||