The author, John Connell, has crafted a well-written book for beginners. The format is a tutorial style that builds upon itself, lesson by lesson and chapter by chapter. Beginners will appreciate the liberal sprinkling of excellent screen shots throughout the book, leaving little to chance. Although a beginner's book, the author delves into ADO, Active Server Pages, and other advanced ADO technologies in the same easy-to-learn format.
Every chapter concludes with a summary of what was learned, followed by key points to consider for review, and finally, several optional exercises that the reader can complete, ensuring a complete understanding of the lessons learned in that chapter.
Ready? Let's walk through the book and I'll provide a "thumbnail view" of each chapter.
Chapter 1: What is a database?
Starting with basic terminology, the reader is slowly introduced to the key knowledge needed to understand exactly what a relational database is, how a database stores information, and how to access that stored information. Each database component is broken down and the principles of data storage and retrieval are explained in John Connell's easily understood writing style.
The biblio.mdb database that is included with all versions of Visual Basic is used as the example database in these early learning stages. At the end of this chapter, you'll take a brief peek inside the biblio.mdb database and see the various relationships between data. The chapter concludes with a discussion of ActiveX Data Objects (ADO), the proposed successor to Data Access Objects (DAO).
Chapter 2: Meet the ActiveX Data Object (ADO).
Using the Data Form Wizard and the ADO data control, the reader builds several forms to retrieve data from the tables in the biblio.mdb database. You'll learn about primary and foreign keys, master/detail format, and the grid control. The ASCII codes are touched on, as are methods of sorting data.
Chapter 3: Programming the Data Control.
This chapter explores programming the data control in more detail. Both the DAO data control and the ADO data control are covered. You'll step beyond the Data Form Wizard's limited features and learn about bound controls, intrinsic controls, masked edit controls, DLLs, and more.
Chapter 4: Designing a User Interface for the Data Control.
This is the area of programming that almost everyone enjoys; designing the user interface. A brief introduction in prototyping an application is given. Then, starting from scratchas opposed to using the Wizard earlierthe reader builds a front-end for the example database. By building the interface manually, the reader will gain a deeper understanding of properties, events, methods, and especially bound controls.
Chapter 5: Programming a Bulletproof User Interface.
This is the first chapter in which the reader starts to get his hands dirty and actually do some coding. Now it's time to enhance the user interface started in the last chapter. You'll add the ability for users to delete, add, and navigate the records in your database. You'll learn about Class modules and also cover the properties of the Data Control in more detail. Common errors and their solutions are also covered. Among other things, the reader learns about control arrays, state-machine concept, and the object browser.
Chapter 6: Completing the User Interface.
Now it's time to polish the user interface you built in the preceding chapters. Added functionality and professional touches will complete your bulletproof, user friendly, data entry form. By this point the reader has learned about message boxes, focus, tab order, locating specific data, and validating data. You'll also have learned to incorporate an API call into a find form for the database.
Chapter 7: Building a Data Control Class Module.
This chapter teaches you to take all of the code that you've built into your nifty user interface and encapsulate it in a reusable class module. You have gained an understanding of code reusability and objects, as well as using the Class Builder.
Chapter 8: Getting the Data You Want from the Database.
The reader is introduced to the Structured Query Language (SQL). Naturally, this chapter only covers SQL fundamentals. SQL is an industry standard, and the knowledge you gain here can be applied to whatever relational database access method you use. Since this book is a tutorial, the reader will build a simple SQL "Query Tester" program.
Chapter 9: Database Design, Construction, and Analysis.
The second half of this book gets the reader more involved by going into more detail and hands on coding. You'll design and build a contacts database from scratch. The reader will gain a deeper understanding of the principles of database design. You'll examine the structure of the DAO object model and learn how to store data in the most efficient manner by creating smaller tables that relate to one another. Finally, you'll build a "Database Analyzer" that will reveal the different aspects of your database.
Chapter 10: Programming the Address Book.
Now you're going to build an address book application that uses the contacts database you created in the last chapter. You'll apply everything you've learned to this point to create an application that includes the following controls: tool bar, tree view, list view, status bar, calendar, tab strip, masked edit, and the image list. You'll also create a pop-up menu for when the user right-clicks, and you'll learn a bit more about Structured Query Language (SQL). This handy little application is a great way to learn these essential controls. You can apply your knowledge of these controls to any of your future projects.
Chapter 11: Universal Data Access Using ADO.
This chapter examines the similarities between ADO and DAO and why ADO is an evolutionary step in the right direction. The ADO object model is explained and you'll write a simple program that shows each of the components. The reader will learn how the OLE DB provider translates the ADO commands. Items covered in this chapter include the Connection and Recordset objects, cursors, and using transactions to speed up your code.
Chapter 12: Creating ADO Data Bound ActiveX Controls.
By this point in the book, you'll be surprised at just how much you've learned. Now you'll code your own reusable data bound ActiveX ADO control and package it as a distributable file. You'll also learn how to add customized property pages to the control. To add more polish, you'll also create an About form and a custom bitmap for the tool palette. And finally, you'll learn how the control is entered into the Registry so that Visual Basic can locate your new control.
Chapter 13: ADO and Active Server Pages.
It's time to leverage your VB knowledge by learning to create your own Active Server web pages using ADO. You'll need to download the free Personal Web Server from Microsoft if you don't already have it. The author leaves nothing to chance and leads you through getting PWS set up and working properly on your system. After that, you'll write a simple ASP script using Notepad and VBScript to get your feet wet and gain an understanding of using the Personal Web Server.
Next you'll write a more serious script that will allow Internet browsers to access your Biblio.mdb database. Then instead of merely displaying your database information, you'll create a form to allow browsers to request specific records from your database. So by this chapter's end, you've learned how Active Server Pages allow the generation of dynamic HTML code. And you'll continue building your web site by learning to write cookies to the client browser for the purpose of identifying repeat visitors to your website.
Chapter 14: Advanced ADO Programming - Data Mining.
As databases grow increasingly larger with years of accumulated data, it becomes vitally important to have the means to extract meaningful information. That's where data mining comes in. The author contends that 80% of all interesting information can be abstracted from a data source using SQL, but that still leaves 20% of "hidden" information. Naturally, a chapter in a beginning series book doesn't cover complex algorithms or neural networks, nor should it. Instead, this chapter introduces the reader to data mining.
Earlier in the book the author made use of the Biblio.mdb for our example database. In this chapter, you'll use a second database called Nwind.mdb that is also included with Visual Basic. Nwind.mdb contains several tables for orders, products, customers, etc. for the mythical Northwind Company. Using SQL and ID3 algorithm, the reader will build a project that examines data for underlying meanings or trends. In building this project the reader also learns more about creating a good user interface.
Chapter 15: Making our Data Available Universally.
The author shows how to import and export data to and from a variety of file formats, including HTML. You will learn about disconnected recordsets and persistent recordsets. The ability to send a disconnected recordset across the building or across the world and have it persist on a local hard drive opens many new possibilities.
Chapter 16: Where Next?
The author wraps up the book with a summary of what has been learned, what VB database technology is likely in the immediate future, and a recommended reading list to continue your quest for Visual Basic knowledge.
All in all, Beginning Visual Basic 6 Database Programming was an enjoyable read. The author takes pains to present new information in a "friendly" style that's easy for the reader to absorb. The reader is moved along at a pace brisk enough to make learning new concepts interesting and fun, but not so fast as to be overwhelmed.
It's worth repeating that the author is not satisfied to cover only safe topics, but takes on ADO, Active Server Pages, and other subjects to a degree not normally covered in a beginner book. Kudos on a job well done, Mr. Connell. This book makes an excellent second beginner book, especially if you're already familiar with forms, properties, events, and methods. But even if you're completely unfamiliar with Visual Basic, the clear writing style and tutorial format make this book a good buy for any beginner. A recommended read by searchVB.com.
About the Author: John Connell [ Return to Article ]
John Connell is a Vice President at First Chicago NDB Bank. He has a Master's Degree in Computer Science and a Master's Degree in Business Administration. John teaches computer programming classes at DePaul University in Chicago.
John has designed and written several financial programs in Visual Basic that are currently in use in many of the largest companies in the United States.