The Data Form Wizard as a Starting Point

Questions That Should Be Asked More Frequently

You've now built a relatively simple application that uses ADO.NET, and you've seen some of the power available in the technology. We've discussed how some of the major features work by looking at code snippets generated by the Data Form Wizard. This chapter is a starting point, but it's also a teaser. So instead of posing questions that developers might ask and then offering answers, as I do in the "Questions..." section of other chapters, here I will simply offer a few questions for you to consider. Some of the answers can be found in the code that the Data Form Wizard generates. For other answers, read on.

  1. Q. I played with the form that the Data Form Wizard generated, and I noticed that I could add new orders. When I added a new order, the OrderID field contained data before I submitted the new order to the database. How did the DataSet generate this number?

  2. Q. What happens if another user modifies the contents of a row between the time I retrieve it and submit the update?

  3. Q. After I deleted a customer and clicked the Update button, I received an error saying that the DELETE statement conflicted with a column reference constraint. What does that mean? How can I change the code to better handle this situation?



Microsoft ADO. NET Core Reference
Microsoft ADO.NET (Core Reference) (PRO-Developer)
ISBN: 0735614237
EAN: 2147483647
Year: 2002
Pages: 104
Authors: David Sceppa

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