Where s the Code?

[Previous] [Next]

Since, as I mentioned before, there's no single "best way" to use ADO, I'm not going to focus on building a large sample application. While I think a large sample that shows off most of ADO's functionality is an attractive idea, I don't think it's appropriate for this text. Too often the material covered in a technical book focuses too heavily on the code and features used in the sample application. That's great—if your design goals meet those of the sample application. You're ultimately better off with a solid understanding of all of ADO's features rather than just the ones used in a large sample.

So instead, I've included some code on the companion CD that isn't so much a sample application as it is a set of tools to help you learn how to discover more about ADO. The more you learn about ADO and how the objects tend to behave, the more comfortable you'll become with determining what will happen in specific situations.

Probably the best example I can give of such a situation deals with conflict detection and resolution with the ADO Cursor Engine. Chapter 12 covers this topic in a fair amount of depth, but that information is not exhaustive by any means. The goal of the chapter is to help you understand what's going on behind the scenes and to show you what types of problems to look for (and how to handle them) when you're developing your application.

To help illustrate the issue of conflict detection, I've included on the companion CD a sample named Detecting Conflicts that I wrote to help me understand how to handle specific conflicts. You can modify that sample to work with your database and your query to determine what to do in your own application. But that's only one of the reasons I've included the sample.

As you learn more about ADO (and other technologies, database or otherwise), questions will naturally arise. You might see a particular method and ask yourself, "What happens to my data if…?" No book, training, or phone call to technical support will ever be able to answer all of your questions. What's much more valuable is learning how to answer those questions yourself, and this conflict detection sample shows you how.

Appendix B of this book contains a description of the sample applications and tools included on the companion CD. Use the samples to learn more about ADO, and take a look at the code in the samples, including the comments, to understand how to come up with your own tests and samples to answer your questions.

With a solid basic understanding of ADO (and with a slightly devious mindset), you can create well-built data access applications. You'll be able to answer your own questions and continue to develop more expertise without having to say, "I wish I'd known that before I started writing all this code." It is my hope that this book will help you develop that understanding.

Let's get started.



Programming ADO
Programming MicrosoftВ® ADO.NET 2.0 Core Reference
ISBN: B002ECEFQM
EAN: N/A
Year: 2000
Pages: 131
Authors: David Sceppa

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