[ Pobierz całość w formacie PDF ]
.mdb will be copied and thenew database file name will be  Mountain Animal1.mdb.&' New from template.This group enables you to choose from General templatesor Templates on Microsoft.com s web site.Templates dialog boxIn addition to using the New section to create a blank database, you can select thefirst choice in the  New from template section of the New File dialog box  GeneralTemplates  and it will open the Templates dialog box, as shown in Figure 5-2.ThisTemplates dialog box was what would open automatically in previous versions ofAccess  2000, 97, and backward.Figure 5-2: The Templates dialog box is activated by selecting theGeneral Templates choice from the New Files dialog box.This isthe same as the old New dialog box that Access presented inprevious versions.The Templates dialog box has two tabs.These are&' General.Create new Access databases, data access pages, or Accessdatabases connected to SQL Server projects.&' Databases.Lets you use the Database Wizard to create a simple ready-to-rundatabase created for Access 2002 including Asset Tracking, ContactManagement, Event Management, Expenses, Inventory Control, Ledger, OrderEntry, Resource Scheduling, Service Call Management, and Time and Billing.Figure 5-3 shows these selections. 3596-X ch05.F 5/30/01 11:33 AM Page 122Part II &' Creating the Objects122Figure 5-3: The Databases page, showing the included databasewizards.You can view these by selecting the Database tab of theTemplates dialog box.Click the first tab (General) to reveal several choices for creating new emptydatabases.&' Blank Database.Creates a new Access.MDB file to enable you to you createtables, queries, forms, reports, macros, and modules.&' Blank Data Access Page.Creates a Web-based (intranet) form with live linksto an Access or SQL database.&' Project (Existing Database).Creates a new SQL Server project (.ADP file) tohold the table data using the Microsoft Database Engine but uses an existingAccess.MDB file as the front-end.&' Project (New Database).Creates both a new Access database (.MDB) and anew SQL Server project (.ADP) to hold the data tables.NewData Access Pages were new in Access 2000 and are essentially live data formsFeaturethat you publish to a corporate intranet.Access 2002 has added many new fea-tures to Data Access Pages.It still requires Internet Explorer 5.x or later and worksbest in version 5.5 or better.Project (Existing Database) creates a new SQL Server project using either SQLServer 6.5, SQL Server 7.x Enterprise Edition, or SQL Server 2000 Desktop (new inVersion 2002) and Microsoft Database Engine.When you create a project, you arecreating a database file with an.ADP extension that only contains tables andqueries.You must also have an Access.MDB data file to contain your user inter-face objects (forms, reports, macros, and modules).Project (New Database) creates a new SQL Server project using either SQL Server6.5, SQL Server 7.x Enterprise Edition, SQL Server 2000 Desktop, or the Microsoft 3596-X ch05.F 5/30/01 11:33 AM Page 123Chapter 5 &' Creating Database Tables123Database Engine.It will create a database file with the.ADP extension that willcontain the tables and queries.The interface objects will be stored in a standardAccess.MDB database.NoteIf you have the Templates dialog box open, close it at this time to continue with Creating a new database.Blank databaseCreating a database is a very simple matter.Just follow the steps below:1.Click New (the first toolbar button) if the New File dialog box is not openalready.You should see the New File dialog box as shown in Figure 5-12.Click  Blank Database under the New category.3.The File New Database dialog box opens, as shown in Figure 5-4.You can seeany existing.MDB files in the file list part of the window.The Save in: combobox may initially open to the My Documents folder.Navigate to the folder youwant to place your new database file in  in the case of the author it is afolder named  Access 2002 db Files.4.A default name of db1.mdb will appear in the File name text box at the bottomof the window  simply type over this default name with the name MyMountain Animal Hospital, or any other name you want to give the database.(Typing the extension,.mdb, is optional, because Access will automaticallysupply it if you do not.)5.Click the Create button.Figure 5-4: The File New Database dialog box, where you will specify aname for the new database.In this case type My Mountain Animal Hospital.Once the new database is created, Access will automatically open it for you. 3596-X ch05.F 5/30/01 11:33 AM Page 124Part II &' Creating the Objects124Understanding How Access Works with DataThere are many ways that Microsoft Access 2002 works with data.For simplicity, you willsee the data stored in local tables in the examples of this book.A local table is a tablestored within the Access.MDB file This is how you have seen examples so far.In many professionally developed Microsoft Access applications, the actual tables are intheir own database while the other interface objects (forms, reports, queries, pages,macros, and modules) are stored in another database.The reason for this is usually main-tainability.By separating the data and their tables into another database you can easily domaintenance work on them (building new indexes, repairing the tables, etc.) withoutaffecting the remainder of the system.In contrast, you may be working with a multi-usersystem and find a problem with a form or report object in the system.If you have all thedata and interface objects in the same database, you would have to shut down the systemwhile repairing the broken form or report  others could not be using the system while yourepair one object.Instead, by separating the data from the other objects, you can fix theerring object while others are still working with the data.Once you fixed the problem, youcan deliver the new changes to the others and they can import it into their local databasesystem.In addition, there is a more critical reason to separate your data from the interfaceobjects  security.By maintaining the data separately in its own database, either locally orin a remote location, as in a multi-user environment, you can maintain better control overthe information.Thus, the solution is to consider separating your tables, and their storeddata, from the rest of the application.While you may want to first develop your application with the tables within the.MDBdatabase, later you can use the Database Splitter wizard to automatically move the tables inyour.MDB file to a separate Access.MDB file and then attach the tables.You can also attachyour tables to the Microsoft Database Engine or the larger SQL Server database.You canalso attach to non-Microsoft servers such as Oracle, Informix, or Sybase.Cross- You will learn more about file attaching in Chapter 22.ReferenceCautionAn Access 2002 database cannot be used by previous versions of Access [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • agnieszka90.opx.pl