Q&A
| Q1: | I don't get it. Why doesn't a DataReader support databinding on Windows Forms? It seems like so much less code to write! |
A1: | It's true that using DataReaders amounts to writing less code. To bind to a control in Windows Forms, the class must expose the IList or IListSource interface of the System.ComponentModel namespace. A DataReader is an unbuffered stream of data that does not support these interfaces. |
| Q2: | You kept mentioning scalability. How can I achieve maximum performance and scalability in my data access applications? |
A2: | Even though applications might be hindered by the hardware they're running on, writing efficient code also makes a big difference. Follow these tips to maximize your code performance:
|
| Q3: | I keep getting errors when I attempt to reuse a connection object after I implement a DataReader. Why? |
A3: | Each time a DataReader is associated with a Connection object, the relationship is exclusive until you explicitly close the DataReader object using the Close method of the DataReader. Doing so releases the Connection object for reuse with another Command object.To get more information online, open the following link. It takes you to the Diving Into Data Access column of the Microsoft Developers Network (MSDN).http://www.msdn.microsoft.com/library/en-us/dndive/html/data06132002.aspThis series of articles gives you tons of great examples on different data access techniques, and discusses more advanced topics such as handling multiple tables in a DataSet and how to manage relationships in a DataSet. |
• Table of Contents
• Index
Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days
By
Jason Beres
Publisher
: Sams Publishing
Pub Date
: January 14, 2003
ISBN
: 0-672-32421-0
Pages
: 696
Sams Teach Yourself Visual Studio .NET in 21 Days will help developers that are new to application development and experienced developers understand how to use the .NET Framework and Visual Studio .NET to rapidly develop any type of computer application. The Visual Studio .NET development environment is the most comprehensive developer tool ever created, putting that together with the .NET Frameworks' Class Libraries, the developer has everything he or she needs to get up-to-speed on Microsoft's latest revolution in application development. This book will guide the developer through using the VS .NET IDE, the Visual Basic .NET and C# language, and the supporting tools available from Microsoft to create Windows and Web-based applications. The market is full of books that pretty much say the same thing, which is already available in the help files, the author of this book has written and deployed over a dozen successful applications using Visual Studio .NET and the .NET Framework. All of his expertise and experience is used to give you the most comprehensive title on using Visual Studio .NET.