Beginning ASP.NET 2.0 Databases: From Novice to Professional is a comprehensive introduction to connecting a website to many different data sourcesnot just databases. You’ll learn how to build a relational database, use SQL to communicate with it, and leverage both in your web applications.
You’ll also learn about the new features of ADO.NET and ASP.NET in .NET 2.0. The authors cover mission-critical issues, such as design, transactions, error handling, optimization, and scalability. They examine SQL Server, Jet, and MySQL databases, and highlight the differences among them.
This comprehensive resource is packed with information about 2.0 beta improvements and building database-driven websites. You will obtain practical solutions, learn multiple routes to achieve success, and examine a handy case study to wrap up core content.
Le informazioni nella sezione "Riassunto" possono far riferimento a edizioni diverse di questo titolo.
Damien Foggon is technical director and lead developer for Thing-E Ltd., a company specializing in the development of dynamic web solutions for the education sector. He was responsible for the development of several ASP and ColdFusion websites, and he's now in the process of moving most of them to ASP.NET. Before coauthoring .NET XML Web Services, Damien was a regular technical reviewer for numerous .NET books. After several false starts, he's busy assembling his personal site.
Beginning ASP.NET 2.0
Databases
From Novice to Professional
■ ■ ■
Damien Foggon
Beginning ASP.NET 2.0 Databases: From Novice to Professional
Copyright © 2006 by Damien Foggon
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-59059-577-0
ISBN-10 (pbk): 1-59059-577-7
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Jonathan Hassell
Technical Reviewers: Ronald Landers, Sahil Malik
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan
Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser, Matt Wade
Project Manager: Richard Dal Porto
Copy Edit Manager: Nicole LeClerc
Copy Editors: Marilyn Smith, Kim Wimpsett
Assistant Production Director: Kari Brooks-Copony
Production Editor: Kelly Gunther
Compositor: Susan Glinert
Proofreader: Linda Seifert
Indexer: Julie Grady
Artist: Kinetic Publishing Services, LLC
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or
visit http://www.springeronline.com.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA
94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly
by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Source Code section.
iii
Contents at a Glance
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
About the Technical Reviewers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
■CHAPTER 1 Data Sources and the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
■CHAPTER 2 Introducing Relational Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
■CHAPTER 3 Displaying Data on a Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
■CHAPTER 4 Database Access in Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
■CHAPTER 5 DataReader and DataSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
■CHAPTER 6 Inline and List Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
■CHAPTER 7 Table Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
■CHAPTER 8 Writing to the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
■CHAPTER 9 The GridView Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
■CHAPTER 10 Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
■CHAPTER 11 Modifying the Database Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
■CHAPTER 12 Useful Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
■CHAPTER 13 Application Design and Implementation . . . . . . . . . . . . . . . . . . . . . . 547
■APPENDIX A Installation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
■APPENDIX B SQL Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
■APPENDIX C SQL Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
■APPENDIX D Sample Database Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
Le informazioni nella sezione "Su questo libro" possono far riferimento a edizioni diverse di questo titolo.
GRATIS per la spedizione in U.S.A.
Destinazione, tempi e costiEUR 3,55 per la spedizione in U.S.A.
Destinazione, tempi e costiDa: SecondSale, Montgomery, IL, U.S.A.
Condizione: Good. Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc. Codice articolo 00018248082
Quantità: 1 disponibili
Da: Wonder Book, Frederick, MD, U.S.A.
Condizione: Very Good. Very Good condition. A copy that may have a few cosmetic defects. May also contain light spine creasing or a few markings such as an owner's name, short gifter's inscription or light stamp. Codice articolo P03I-00068
Quantità: 1 disponibili
Da: Half Price Books Inc., Dallas, TX, U.S.A.
paperback. Condizione: Very Good. Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! Codice articolo S_390136375
Quantità: 1 disponibili
Da: Better World Books: West, Reno, NV, U.S.A.
Condizione: Good. Used book that is in clean, average condition without any missing pages. Codice articolo 50938124-75
Quantità: 1 disponibili
Da: WorldofBooks, Goring-By-Sea, WS, Regno Unito
Paperback. Condizione: Very Good. The book has been read, but is in excellent condition. Pages are intact and not marred by notes or highlighting. The spine remains undamaged. Codice articolo GOR003652941
Quantità: 1 disponibili
Da: Better World Books Ltd, Dunfermline, Regno Unito
Condizione: Very Good. Ships from the UK. Former library book; may include library markings. Used book that is in excellent condition. May show signs of wear or have minor defects. Codice articolo 50262982-20
Quantità: 1 disponibili
Da: Books Puddle, New York, NY, U.S.A.
Condizione: New. pp. 656. Codice articolo 26293354
Quantità: 1 disponibili
Da: Majestic Books, Hounslow, Regno Unito
Condizione: New. pp. 656 3:B&W 7.5 x 9.25 in or 235 x 191 mm Perfect Bound on White w/Gloss Lam. Codice articolo 7587381
Quantità: 1 disponibili
Da: Lucky's Textbooks, Dallas, TX, U.S.A.
Condizione: New. Codice articolo ABLIING23Mar2811580082146
Quantità: Più di 20 disponibili
Da: Biblios, Frankfurt am main, HESSE, Germania
Condizione: New. pp. 656. Codice articolo 18293344
Quantità: 1 disponibili