Sams Teach Yourself .Net in 21 Days
- Table of Contents
- Copyright
- About the Author
- About the Technical Editor
- Acknowledgments
- We Want to Hear from You
- Introduction
- Week 1: At a Glance
- Day 1. Introduction to the Microsoft .NET Framework
- Day 2. Introduction to Visual Studio .NET
- Day 3. Writing Windows Forms Applications
- Day 4. Deploying Windows Forms Applications
- Day 5. Writing ASP.NET Applications
- Day 6. Deploying ASP.NET Applications
- Day 7. Exceptions, Debugging, and Tracing
- Week 1. In Review
- Week 2: At a Glance
- Day 8. Core Language Concepts in Visual Basic .NET and C#
- Day 9. Using Namespaces in .NET
- Day 10. Accessing Data with ADO.NET
- Day 11. Understanding Visual Database Tools
- Day 12. Accessing XML in .NET
- Day 13. XML Web Services in .NET
- Day 14. Components and .NET
- Week 2. In Review
- Week 3: At a Glance
- Day 15. Writing International Applications
- Day 16. Using Macros in Visual Studio .NET
- Day 17. Automating Visual Studio .NET
- Day 18. Using Crystal Reports
- Day 19. Understanding Microsoft Application Center Test
- Day 20. Using Visual SourceSafe
- Day 21. Object Role Modeling with Visio
- Week 3. In Review
Q&A
-
You had me write all this code yesterday. What should I do: write the code or use the wizards?
When designing Windows Forms applications, using the wizards is a highly effective and efficient way to write all your data access code. Most developers like to separate their data logic into components, but the Data Form Wizard isn't an effective way to do that. Either way, if you're new to ADO.NET, using the tools in Visual Studio .NET to learn the syntax for data access is a good idea.
-
You said DataReaders are lightweight and incur less overhead cost. But everything I learned today used DataSets, not DataReaders. Why?
Because DataReaders don't support databinding, they're not very useful in Windows Forms, where you can use databinding for all your data presentations.
-
What happens if my data requirements change and I need to change the code that the wizard created for the InsertCommand, SelectCommand, DeleteCommand, and UpdateCommand properties on the DataAdapter?
Your best bet is to run the Configure Adapter Wizard from the Data menu. This enables you to easily change the queries or stored procedures for the DataAdapter, and let the Configuration Wizard rewrite the data access code.
Quiz | Next Section

Account Sign In
View your cart