Because there are many requirements and many options for computer databases nowadays, there are also various techniques of creating a database. Still, by its basic definition, a database is primarily one or more lists. How the list(s) is (are) created can depend on various circumstances. To make it possible to create databases, various libraries have been developed and you use one of these libraries to do a better job: Microsoft Access Object Library: Microsoft Access provides its own mechanism for creating and managing a database. It provides most of the tools you need to start and complete a database project. Microsoft Access is also equipped with a library, the Microsoft Access Object Library that you can use to programmatically create and manage databases. This library is already available to you so you don't have to "load" it. Microsoft Data Access Object: Microsoft Data Access Object, or DAO, is a library that ships with Microsoft Access and allows you to create, maintain, and manage databases. It also provides various means of performing the necessary operations on a database. Microsoft ActiveX Data Objects: Microsoft ActiveX Data Objects, also called ADO, is a library that was developed to allow programmers with other environments to create and manage Microsoft Access databases. To support this, it provides a driver that allows these other programming environments to "attach" their applications to a Microsoft Access database. Like Microsoft Access' own library, you can use ADO inside of Microsoft Access to fully create and manage a database. Microsoft ADOX: Microsoft ActiveX Data Object Extensions for Data Definition Language and Security, also called ADOX, is an addition to ADO. Besides many of the ADO operations it can perform, you can use it for additional assignments such as creating a database. ADO.NET: ADO.NET is a technique developed by Microsoft and that is part of the .NET Framework. This technology allows you to use one or more libraries of the .NET Framework and one or more of the languages of the .NET Framework to create and manage a database. Although its name includes ADO, ADO.NET is neither ADO nor a real library, it is a technique of creating and managing databases. For example, while ADO contains objects and collections, ADO.NET does not own anything (because it is not a library; it is only a concept of dealing with databases). Win32 API: A library is practically never complete. To complement those cited above, you can use others. One the external libraries you can use is called Win32. It belongs to Microsoft Windows and is already installed with the operating system. Because most of its functions are written in C, they cannot be directly used in a Microsoft Access database: you must import them. Other Libraries: Besides the above libraries, Microsoft and other companies regularly publish other libraries you can use to perform some tasks in your Microsoft Access databases. Additionally, you can create your own library, or ask someone else to create libraries for you, using languages such as C, C++, Pascal, etc.
In our lessons, we will be using Microsoft Office Access 2007 to create computer-based databases. There are different techniques you can use to launch it. Probably the easiest technique consists of clicking Start -> (All) Programs -> Microsoft Office -> Microsoft Office Access 2007. You can also create a shortcut to your desktop or above the Start menu. When Microsoft Access starts, it displays a window with a button in the top-left corner, followed by some buttons on the right side and the Microsoft Access name.
When Microsoft Access starts, it displays the title bar that starts with the Office Button . The Office button can display a tool tip when the mouse is positioned on it:
If you click the Office Button, a menu appears:
This menu can be used to create a new database or to open an existing database, etc.
The Office Button displays the Quick Access Toolbar in the right section. You can hide the Quick Access toolbar if you right-click it and click Remove Quick Access Toolbar. The Customize button appears after the Quick Access toolbar. When it gets clicked, a menu appears:
You can use it add or remove buttons on the Quick Access toolbar. To add a button, you can click the Customize button and click an item from the menu. To use an item that is not represented on the menu:
This would open the Access Options dialog box: If you want to add an item, you can click it in the middle list, and click the Add button. After making your selections, click OK When Microsoft Access freshly opens, its screen is divided in three sections. The left column displays a few labels where the top item is Online Templates. The middle section is made of two sections. The top part is used to quickly create a database:
The other section shows some information. The right side displays a list of recently opened databases. The bottom section of the Microsoft Access interface displays a status bar.
There are various types of databases you can use in Microsoft Access. You can create a database from scratch. You can use some objects that ship with Microsoft Access 2007 to create a database. You can open either a database you previously created or one made by someone else.
There are various ways you can create a database. To start a database from scratch, after launching Microsoft Access, you can click Blank Database. In the right section, accept or change the name of the database. If you want to create a Microsoft Access 2007 database, either omit or add the .accdb extension If you want to create a database that is compatible with previous versions of Microsoft Access, you must add the extension .mdb. The name of the database follows the rules of files of Microsoft Windows. For example, the name can be made of letters, digits, spaces, and other allowed characters, up to 255 of them. After specifying the name, you should pay attention to the path. The path is the location, in your computer or your network, where the database as a file would be found. By default, the File Name text box selects the My Documents folder for a new database. In most cases, this would be enough. Otherwise, to specify a folder of your choice, under File Name and on the right side of the name of the database, click the Browse button . This would open the File New Database dialog box. You can click the arrow of the Save In combo box to select a drive such as (A:), (C:), etc: After selecting the drive, you can either select an existing folder or create a new folder by clicking the Create New Folder button on the right side of the Save In combo box: You can also use a directory on the network as the repository of the new database. To specify a network folder, if your computer is part of a network, you can click the arrow of the Save In combo box, and select Network Neighborhood or My Network Places: From Network Neighborhood or My Network Places, select an existing directory or navigate the network until you reach the desired folder. In some cases, you might need to contact your IT department for the right directory to use. After specifying a drive and a folder, you can click Create. A database project is a database that is used to connect to a Microsoft SQL Server database. For such a project, the actual database resides on a server. The objects in Microsoft Access are used to let the user interact with the database because they are visual and user friendly while the objects in Microsoft SQL Server are mostly made of non-user-friendly lists only. To start a project, create a blank database. When specifying the name of the database, add the .adp extension: After specifying the file name (and the path), click Create. This would display a message box asking you whether you want to connect to a Microsoft SQL Server database: If you already have the database you want to connect to, you would click Yes. This would open the Data Link Properties dialog box: In the Data Link Properties, you can select the server, the type of authentication, and the database. Once you are ready, you can click OK. Microsoft Access would then attempt to connect to the database. If there is a problem, you would receive an error. If there is no problem, a connection would be established and you can continue working on, or finalizing the project. If you did not have a Microsoft SQL Server yet but are working on a computer on which Microsoft SQL Server is installed, when the message box appears, you can click No. A Microsoft SQL Server Database Wizard would start: This would allow you to create a database.
Microsoft Access ships with a few sample databases you can use and customize. To create a database from a template, after launching Microsoft Access, in the middle section, locate one under Featured Online Templates: Click one of the buttons. Access or change the suggested name of the database, and click Download. Alternatively, on the left side, click Local Templates, then, in the main section, select one of the samples under Local Templates:
There are various ways you can open a database. If you click the Office Button and some databases were previously used, they would appear in the list. Here is an example: If you see a database you want to use, you can click it. In a Windows utility such as Windows Explorer or My Documents, if you see a database you want to use, you can double-click it to open. If you receive a database by mail, you can also open it.
If you have a database you do not need anymore, you can delete it. To delete a database, in My Documents, in Windows Explorer or another file management application:
A warning message would be presented to you to confirm what you want to do. After you have deleted a database, it doesn't disappear from the MRU lists of Microsoft Access. This means that, after a database has been deleted, you may still see it in the right column menu of the Office Button or in the list under the Open Recent Database column. If you try opening such a database, you would receive an error. Here is an example from trying to open a database named Things To Do after it had been deleted (although it still appears under Open Recent Database): If a database has been deleted and you want to remove it from the MRU lists, open the Registry (Start -> Run: regedit, Enter). Open the following key: HKEY_CURRENT_USER - Software - Microsoft - Office - 12 - Access - Settings Locate the deleted database and delete its key.
|
|
The version of Microsoft Visual Basic we are using here is "For Applications". Indeed, you can create a fairly functional application with this version, but it is related to Microsoft Access. When you are in the Code Editor of Microsoft Visual Basic, you can get back to Microsoft Access either from the View Microsoft Access button on the Standard toolbar, or by clicking a Microsoft Access object on the Taskbar. The shortcut to get back to Microsoft Access is Alt + F11. You can close Microsoft Visual Basic any time and keep Microsoft Access running. To do this, on the Standard toolbar of Microsoft Visual Basic, you can click the View Microsoft Access button to get back to the database. On the other hand, if you close Microsoft Access, Microsoft Visual Basic will be closed also. Since Microsoft Access shares the same functionality you are probably familiar with from using other applications, you can close it easily.
|