ASP.NET Database Programming Weekend Crash Course™
Total Page:16
File Type:pdf, Size:1020Kb
4830-1 cover 10/25/01 2:13 PM Page 1 BUTLER GetGet UpUp toto SpeedSpeed onon ASP.NETASP.NET CAUDILL DatabaseDatabase ProgrammingProgramming —— inin aa Weekend!Weekend! CD-ROM INCLUDES: • Assessment software he big day is Monday. The day you get to show off what you know about ASP.NET database programming. The problem is, you’re not ASP.NET to help gauge your T 15 progress really up to speed. Maybe it’s been a while since you worked with DATABASE PROGRAMMING Active Server Pages. Or maybe you’re new to Microsoft .NET or database • General Membership HOUR programming. In any event, we’ve got a solution for you — ASP.NET WEEKEND on Brinkster.com Database Programming Weekend Crash Course. Open the book Friday Web Hosting Service CRASH ™ evening and on Sunday afternoon, after completing 30 fast, focused COURSE • .NET Compression sessions, you’ll be able to jump right in and start to create dynamic, ASP.NET DATABASE PROGRAMMING DATABASE ASP.NET Library trial version WEEKEND CRASH COURSE data-driven Web applications. It’s as simple as that. WEEKEND CRASH COURSE WEEKENDWEEKEND CRASH CRASH COURSE COURSE • BrowserHawk evaluation version The Curriculum FRIDAY SATURDAY, continued SUNDAY • Infragistics Evening: 4 Sessions, 2 Hours Afternoon: 6 Sessions, 3 Hours Morning: 6 Sessions, 3 Hours UltraSuite and • Introducing ASP.NET • Validating User Input • Introducing Datasets, ASPUpload trial • Setting Up .NET • Maintaining State in Part II versions • Designing a Database ASP.NET • Data Binding • SQL, A Primer • Authentication and • Using the DataGrid Control • Sample code from Authorization with Bound Data JASON • ASP.NET Caching • Beating the CRUD out of the book SATURDAY BUTLER the DataGrid Morning: 6 Sessions, 3 Hours • Introducing ADO.NET • Navigating The ADO.NET • Data Shaping with TONY • Databases, A Primer on Object Model ADO.NET SQL Server 2000 CAUDILL • Handling ADO.NET Errors • XML, A Primer • Developing ASP.NET Pages Evening: 4 Sessions, 2 Hours • Opening a Connection Afternoon: 4 Sessions, 2 Hours 15 • Using HTML Controls •SOAP • Using ASP.NET Controls • Executing Commands HOURS • Web Services • User Controls • Using The DataReader Object • Migrating From ASP to 30 Sessions That • Introducing Datasets, ASP.NET Part I • Migration From ADO to CD-ROM Will Have You ADO.Net with assessment Creating Dynamic, software, sample Data-Driven Web System Requirements: ISBN 0-7645-4830-1 Pentium PC running Windows 95 code, and more Applications in or later, Windows NT 4 or later. For more information on ™ Only 15 Hours 128 MB RAM. See the About the Hungry Minds, go to CD Appendix for details and www.hungryminds.com complete system requirements. $24.99 US Category: $37.99 CAN Programming/Web Development *85555-AIABIi ,!7IA7G4-feidah!:P;m;o;t;T £19.99 UK incl. VAT 014830-1 FM.F 11/7/01 9:00 AM Page i ASP.NET Database Programming Weekend Crash Course™ Jason Butler and Tony Caudill Cleveland, OH • Indianapolis, IN • New York, NY 014830-1 FM.F 11/7/01 9:00 AM Page ii ASP.NET Database Programming Weekend Computer Publishing Corporation, Inc., for the Crash Course™ Philippines; by Contemporanea de Ediciones for Published by Venezuela; by Express Computer Distributors for Hungry Minds, Inc. the Caribbean and West Indies; by Micronesia Media 909 Third Avenue Distributor, Inc. for Micronesia; by Chips New York, NY 10022 Computadoras S.A. de C.V. for Mexico; by Editorial www.hungryminds.com Norma de Panama S.A. for Panama; by American Copyright © 2002 Hungry Minds, Inc. All rights Bookshops for Finland. reserved. No part of this book, including interior For general information on Hungry Minds’ products design, cover design, and icons, may be reproduced and services please contact our Customer Care or transmitted in any form, by any means (elec- department within the U.S. at 800-762-2974, out- tronic, photocopying, recording, or otherwise) with- side the U.S. at 317-572-3993 or fax 317-572-4002. out the prior written permission of the publisher. For sales inquiries and reseller information, includ- Library of Congress Catalog Card No.: 2001089343 ing discounts, premium and bulk quantity sales, ISBN: 0-7645-4830-1 and foreign-language translations, please contact Printed in the United States of America our Customer Care department at 800-434-3422, fax 10 9 8 7 6 5 4 3 2 1 317-572-4002 or write to Hungry Minds, Inc., Attn: IB/SZ/RR/QR/IN Customer Care Department, 10475 Crosspoint Distributed in the United States by Hungry Minds, Boulevard, Indianapolis, IN 46256. Inc. For information on licensing foreign or domestic Distributed by CDG Books Canada Inc. for Canada; rights, please contact our Sub-Rights Customer Care by Transworld Publishers Limited in the United department at 212-884-5000. Kingdom; by IDG Norge Books for Norway; by IDG For information on using Hungry Minds’ products Sweden Books for Sweden; by IDG Books Australia and services in the classroom or for ordering exam- Publishing Corporation Pty. Ltd. for Australia and ination copies, please contact our Educational Sales New Zealand; by TransQuest Publishers Pte Ltd. for department at 800-434-2086 or fax 317-572-4005. Singapore, Malaysia, Thailand, Indonesia, and Hong For press review copies, author interviews, or other Kong; by Gotop Information Inc. for Taiwan; by ICG publicity information, please contact our Public Muse, Inc. for Japan; by Intersoft for South Africa; Relations department at 317-572-3168 or fax by Eyrolles for France; by International Thomson 317-572-4168. Publishing for Germany, Austria, and Switzerland; For authorization to photocopy items for corporate, by Distribuidora Cuspide for Argentina; by LR personal, or educational use, please contact International for Brazil; by Galileo Libros for Chile; Copyright Clearance Center, 222 Rosewood Drive, by Ediciones ZETA S.C.R. Ltda. for Peru; by WS Danvers, MA 01923, or fax 978-750-4470. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND AUTHOR HAVE USED THEIR BEST EFFORTS IN PREPARING THIS BOOK. THE PUBLISHER AND AUTHOR MAKE NO REPRESENTA- TIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS BOOK AND SPECIFICALLY DISCLAIM ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THERE ARE NO WARRANTIES WHICH EXTEND BEYOND THE DESCRIPTIONS CONTAINED IN THIS PARAGRAPH. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES REPRESENTATIVES OR WRITTEN SALES MATERIALS. THE ACCURACY AND COMPLETENESS OF THE INFORMATION PROVIDED HEREIN AND THE OPINIONS STATED HEREIN ARE NOT GUARAN- TEED OR WARRANTED TO PRODUCE ANY PARTICULAR RESULTS, AND THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY INDIVIDUAL. NEITHER THE PUBLISHER NOR AUTHOR SHALL BE LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER COMMERCIAL DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR OTHER DAMAGES. Trademarks: Hungry Minds, the Hungry Minds logo, Weekend Crash Course and related trademarks are trademarks or registered trademarks of Hungry Minds, Inc. in the United States and other countries and may not be used without written permission. All other trademarks are the property of their respective owners. Hungry Minds, Inc., is not associated with any product or vendor mentioned in this book. is a trademark of Hungry Minds, Inc. 014830-1 FM.F 11/7/01 9:00 AM Page iii About the Authors Jason Butler is a Principal Consultant with PricewaterhouseCoopers LLP. Jason has built numerous Microsoft-centric Web applications for Fortune 500 companies. When not writing code, he religiously works out at a gym near his home in northern Virginia. Jason is also a devoted Hootie & The Blowfish fan. Tony Caudill is a Principal Consultant at PricewaterhouseCoopers LLP. Tony has written and deployed custom Microsoft Solutions for twenty Fortune 500 Companies to support the inte- gration of SAP, Siebel, and other ERP/CRM applications. When not managing system imple- mentation projects, he avidly pursues surfing in southern California at his favorite beaches and tackles skiing at Big Bear. Dedications I would like to dedicate this book to my family and friends who have provided me with tremendous support and happiness throughout my life. To my mother, Marian, for inspiring me to be that best person that I possibly can. To Donna, without whose support, encouragement, and patience this book would never have been completed. To my father, Al, for always providing much needed advice and support. And to my stepfather, Steve, for being who you didn't have to be. I would also like to send my prayers to all of the families impacted by the tragic events of September 11, 2001. - Jason I would like to dedicate this book to my family and friends, who have supported me and given me tremendous joy over the past year: Marie and Bradley Caudill. I also would like to offer my prayers for the families impacted by the tremendous tragedies of September 11 and my support for the policemen, firefighters, and communities of New York and Washington. And to the US military leadership, such as my father, Sy, and his wife Sue, who like so many soldiers before them will face a long, challenging, and difficult road to building a foundation for us all in our search for peace. -Tony 014830-1 FM.F 11/7/01 9:00 AM Page iv Credits Acquisitions Editor Project Coordinator Sharon Cox Maridee Ennis Project Editor Graphics and Production Specialists Sharon Nash Sean Decker Joyce Haughey Development Editor Gabriele McCann Michael Koch Kristin McMullan Technical Editors Jill Piscitelli Todd Meister Betty Schulte Peter MacIntyre Erin Zeltner Copy Editor Quality Control Technician Maarten Reilingh John Bitter Susan Moritz Editorial Assistant Angel Perez Cordelia Heaney Carl Pierce Editorial Manager Sossity R. Smith Mary Beth Wakefield Proofreading and Indexing Senior Vice President, Technical Publishing TECHBOOKS Production Services Richard Swadley Vice President and Publisher Joseph B.