Q&A

Q1:You had me write all this code yesterday. What should I do: write the code or use the wizards?
A1: 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.
Q2:You said DataReaders are lightweight and incur less overhead cost. But everything I learned today used DataSets, not DataReaders. Why?
A2: Because DataReaders don't support databinding, they're not very useful in Windows Forms, where you can use databinding for all your data presentations.
Q3: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?
A3: 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.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.223.190