【正文】
telephone book you look at. The first step in defining all the minitasks required for this topic is to list the data elements you want to put in the database. Table 1 lists the data elements that you can use for this type of application. Name Type First Name String Last Name String Spouse Name String Child Name String Address String City String State String ZIP Integer EMail Address String Phone Long Birth Date Date Notes String Table 1: Data Elements That Can Be Included In The Application Database. This list is pretty straight forward, but look more closely at it. It has elements such as phone numbers and birth date. Can a person not have more than one phone number? Yes! Or, if you’re allowing users to enter the names of the person’s spouse and children, you could have more than one birth date to enter. When the tables for this database are created, you’ll need to design the capability to handle copies of these types of elements. How do you want users to see the information? This section of the application will require the following forms: Book entry form: and Detailed Entry display. Although only two forms are involved with the data entry and display, each form performs quite a bit of processing. The first form gives users an easy way of entering information. Depending on how fancy you want to get, you could create a form that uses many of the more advanced Visual Basic controls. Also, you can see that the form is split in two with the TabStrip control to make unique areas for business and personal information for that entry. Now, what are the tasks that this form must perform when a new entry is added? This list is fairly standard for most database applications: Validate the dates entered: Edit the phone numbers for the correct amount of digits: Verify that this person is not already in the database。Allow for different users。Print different types of reports。Search for a particular name。Keep names and addresses。Microsoft SQL Server. Using a remote database requires you to use either the remote database objects available only in the Enterprise version of Visual Basic 6 or the new ActiveX Data Objects available in all releases of Visual Basic 6. If you’re designing an application that will use one of these large databases, however, the best way to create the application that will use the singlePC version during the design, development and testing process. Then, we when the application is pleted, switch to ODBC connection to the larger, serverbased version. Designing a Database Application in VB 2 By Errol Booysens Difficulty: Beginners to Intermediate Building the Initial Design Creating an application is a lot like building a house. For a wellbuilt house, you need a blueprint to follow, but to create a good blueprint, you need to know who’s going to live in the house and what their living styles will be. This will help you decide the number and sizes of the bedrooms, what colours to use, and so on. With an application, the blueprint is the technical specifications。Sybase。Oracle。 and and Wide industry support – Many vendors including Microsoft have already announced support for the UDA standards. In previous releases of Visual Basic, you needed to choose from either DAO (local) access methods to data or RDO (remote) access to data. Now, with the support of UDA , Visual Basic has a third method for data access called ADO, or ActiveX Data Objects. This allows you to bine the different ways of accessing data into one set of programming calls and objects. ADO works in conjunction with OLE DB and ODBC to provide access to one database you might be working with. Getting forward, Microsoft plans to phase out ODBC in favour of OLE DB and the UDA standards. However, for the near future, DAO and RDO, as well as ODBC, will still be supported to allow developers to slowly move up to the new standards of data access. Local Databases Local databases are generally much smaller than the remote type of database. The following databases fall into this category: and Remote databases cannot be accessed by using Visual Basic’s standard database access capabilities. Understanding the differences will help you select the correct database for your application. However, in Visual Basic 6, there is now a way to access both local and remote databases using the same database access controls and objects known as the ActiveX Data Objects. Understanding Universal Data Access (UDA) As databases have grown and moved off the local puter and onto worked database servers, the methods employed to access the databases have changed. Microsoft has addressed these changes by developing strategy to allow for any pany or database to be accessed the same way. This is called Universal Data Access, or UDA. Understanding what UDA means is not as simple as understanding to use it. The reason for this is that UDA is a set of rules and access methods that must be followed by any pany that is creating a database access method to be used. This allows you, the pro