Organization of the Book

This book presents practical development techniques, and, therefore, most chapters are rich in code samples. My experience with conducting seminars tells me that developers like to see things work. While I cannot actually run the samples for you, the book includes a rich collection of code samples that demonstrate how to perform typical database tasks as they highlight selected features and Visual Basic .NET capabilities. The book s initial chapter and portions of other chapters set a context for the code samples by discussing conceptual issues.

The book s first and last chapters each treat a distinct topic ”namely, an overview of the .NET Framework in the first chapter and a review of security techniques in the last. In between, the book has four groups of chapters that treat major topics from multiple perspectives: Visual Basic .NET, Windows Forms, ADO.NET, and Web development. The book s appendix examines techniques and uses for XML when creating .NET solutions for Access databases.

Overview of the .NET Framework

Chapter 1 presents an introduction to the .NET Framework that is customized to address the specific concerns of Access developers. The overall goal of the book is to equip developers to create .NET solutions for Access databases. The role of Chapter 1 is to present concisely those core concepts that will motivate Access developers to learn the .NET Framework and Visual Basic .NET.

Visual Basic .NET

Chapters 2 through 4 examine Visual Basic .NET. Chapter 2 concludes with a Jump Start sample that illustrates the application of concepts presented in Chapter 1. The sample shows how to populate a DataGrid control on a Windows Forms class instance with the contents of the Shippers table from the Northwind database that ships with Access. The step-by-step instructions for implementing the sample include the addition of just a single line of custom code. The other steps for implementing the sample draw exclusively on graphical techniques.

Chapter 3 shifts the focus to coding techniques. The chapter begins by contrasting Visual Basic data types with Visual Basic .NET data types. The chapter s initial section also clarifies the distinction between value types and reference types and equips developers to deal with the object orientation of Visual Basic .NET. The next three sections deal with traditional coding topics, including procedures, looping, and arrays. Going through the samples in these sections will reinforce your grasp of these topics and highlight selected differences between Visual Basic and Visual Basic .NET. This chapter closes with a review of core concepts on class development techniques and a collection of samples that illustrate the application of the concepts. Since classes are so important in the .NET Framework, an understanding of the material in this concluding section is critical.

Chapter 4 moves on to a mix of four topics that are more advanced and innovative than those covered in Chapter 3. For example, Chapter 4 introduces classes that facilitate file processing while concurrently covering practical topics, such as reading and writing binary and text files. Because of the greater emphasis on classes with Visual Basic .NET, event handling is more important than ever, and the chapter s second section reviews statements and syntax for handling class events. The discussion then moves to class inheritance. Visual Basic .NET is the first version of Visual Basic to enable developers to create custom classes that inherit properties and methods from other custom classes. The sample for this part of the chapter demonstrates how to put class inheritance to work in your applications.

One of the most highly touted innovations in Visual Basic .NET is its structured exception handling. This new feature eliminates the need for the On Error GoTo statement that turns your procedures into spaghetti code. The Try Catch Finally statement implements the new error handling functionality, and Chapter 4 concludes with several samples that demonstrate various approaches to using this new statement.

Windows Forms

Visual Basic .NET introduces a new type of form class for LANs available from the Windows Forms class library. While this form ”which is based on the System.Windows.Forms.Form class ”has a different architecture from Access forms or classic Visual Basic forms, you still populate Form class instances with controls via traditional drag-and-drop techniques. Basic techniques for working with the Form class received attention in Chapters 2 through 4. Chapter 5 takes a more systematic look at the Form class and shows you how to put it to use in an application. In particular, you learn ways of having Visual Studio .NET create codes samples for you.

Next we carefully illustrate some typical kinds of applications for text box controls and present a sample that demonstrates how to present an image on a Windows Form class instance based on a selection from a ComboBox control. The chapter closes with samples for working with multiple forms, such as navigating sequentially from one form to another, passing data between parent and child forms, and creating a switchboard form to navigate an application s flow to two or more forms from a central form that serves as a switchboard.

Chapter 6 drills down more deeply into Windows Forms, but it examines only three topics. The first topic concerns navigation between forms and data source assignment to form controls. As explained in Chapter 5, the tie between form controls and data sources occurs through ADO (or more specifically the ADODB and ADOX type libraries) and the .NET Framework s COM Interop feature. Since ADO is a collection of COM objects corresponding to its type libraries, the .NET Framework s COM Interop feature enables the use of ADO from within Visual Basic .NET applications.

The Data Form Wizard, which is the chapter s second major topic, should be particularly attractive to Access developers initially learning Visual Basic .NET because it offers a graphical user interface for tying Windows Forms to data from an Access database via ADO.NET. The section presents samples particularly familiar to Access developers, including samples demonstrating data access and manipulation via TextBox controls and a main/sub form. The last section in Chapter 6 reviews selected DataGrid control properties. This control is a particularly flexible control for data display and manipulation. The samples in the concluding sections of Chapter 6 extend your grasp of the DataGrid control s functionality from samples that appear in prior chapters.

Note  

Selected COM objects, such the Office XP object models, require middleware between the COM Interop feature and the native type library for a COM object. In my testing, the ADODB and ADOX type libraries worked properly without any middleware. However, Microsoft issued special middleware, Office XP Primary Interop Assemblies, for selected Office XP object models, such as those for Access 2002 and Excel 2002. Microsoft published an article online illustrating the use of this middleware for Office XP object models and the COM Interop feature ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_oxppias.asp ). At the time that I write this Introduction, there are no special Primary Interop Assemblies for the ADODB and ADOX object models.

ADO.NET

Chapters 7 through 9 equip you to perform ADO.NET development with Access databases. ADO.NET, in contrast to ADO, is the native data component for the .NET Framework. As a consequence, ADO.NET is faster and more flexible than ADO in .NET solutions. Chapter 7 focuses on platform requirements and architectural issues for ADO.NET. The goal of this chapter is to educate you about the main components of the ADO.NET object model. You learn what objects are available as well as how to put them to use. Code samples help to grow your understanding of the ADO.NET objects.

Chapter 8 shifts the focus from learning about ADO.NET objects to applying them. There are numerous samples in this chapter that demonstrate typical kinds of tasks that take advantage of alternative features. For example, you will discover samples showing how to perform dynamic data access with either SQL strings or parameters. One especially informative sample in this chapter illustrates how to handle concurrency violations. A .NET application can generate a concurrency violation when two users attempt to change the same row in a data source. Your application designs should account for the possibility of concurrency violations.

Chapter 9 probes selected advanced ADO.NET topics such as the distinctions between two different types of dataset objects and how to create and apply each kind of dataset. The chapter concludes with the presentation of a case study sample that illustrates typical data access and data manipulation chores with a Windows Forms class instance.

Web Development

The coverage of Web development issues extends across three chapters. Chapters 10 and 11 combine to give coverage of an ASP.NET solution, the type of Web development that creates a Web page for clients to view in a browser. Chapter 10 introduces basic Web design issues and contrasts them with more familiar Windows application development paradigms . You will learn how to collect data from and write content to a Web page during the round trip of a Web page from a browser to a Web server and back to the browser. Chapter 11 moves the focus from design and architecture issues to database tasks. ASP.NET operates with the same kinds of tools, such as the Data Form Wizard and ADO.NET, as applications using Windows Forms. However, the Web environment imposes a special kind of discipline because pages must regularly go back and forth between a browser and a Web server. This chapter illustrates three different approaches to data processing in Web environments. First, you learn how to use the Data Form Wizard for Web development. Next, step-by-step instructions and a short code sample show how to create ADO.NET objects graphically for use with a Web page. The chapter closes with a code sample that demonstrates how to programmatically manage inserts , updates, and deletes in an Access database from a Web page.

Chapter 12 is all about creating, invoking, and deploying XML Web services solutions. A Web service is an application that runs on one computer that a second computer can invoke remotely; the Web services architecture includes all the infrastructure for interfacing the two computers. This built-in infrastructure dramatically simplifies the task of having two computers participate in a peer-to-peer relationship in which one computer hosts the Web service and the other computer hosts the client application. You learn how to build client applications as Windows or Web applications. The chapter concludes with a sample demonstrating how to build a Web service on one computer that returns a dataset based on an Access database to another computer.

Security

Properly securing an application is more important than ever before. Actually, securing a database application includes a mix of technologies ”those for the development environment, such as the .NET Framework, and those for the database, such as user-level security in Access. Chapter 13 starts with a broad overview of .NET Framework security technologies and then demonstrates how to set up and apply Access user-level security in a .NET application. The closing sample illustrates how to apply a .NET Framework Web technique for securing an application that relies on an Access database.

XML

XML is the darling technology of tools developers, but many application developers have limited experience with XML documents and their uses. Tools developers are still in the process of creating a rich set of tools that will enable application developers to accomplish tasks using XML that they now handle via more traditional means. As the application developers become familiar with the technology, they will undoubtedly discover new capabilities that are uniquely available through XML.

The title of the book s appendix succinctly describes its role in the book: XML for Visual Studio .NET Access Developers. While XML is not essential for database chores with the .NET Framework, a working knowledge of XML serves two purposes. First, it can help you to grasp the mechanics of underlying .NET Framework technologies, such as SOAP for Web services. Second, by learning the basics of XML now, you ready yourself for the oncoming tidal wave of emerging technologies that will expose XML in meaningful ways to application developers.

 


Programming Microsoft Visual Basic. NET for Microsoft Access Databases
Programming Microsoft Visual Basic .NET for Microsoft Access Databases (Pro Developer)
ISBN: 0735618194
EAN: 2147483647
Year: 2006
Pages: 111
Authors: Rick Dobson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net