Beginning ASP.NET Databases Using VB.NET
For a web site to offer its users an experience that improves on that of newspapers or textbooks, it needs a way to change the information it contains dynamically - and that means it needs access to a data source. Through the combination of ASP.NET and ADO.NET, Microsoft provides everything necessary to access, read from, and write to a database, and then allow web users to view and manipulate that data from a web browser. In this book, we'll show you how it's done.
What does this book cover?
Packed with clear explanations and hands-on examples, Beginning ASP.NET Databases contains everything you'll need on your journey to becoming a confident, successful programmer of data-driven web sites. In particular, we'll look at:
- Connecting to common data sources, including SQL Server and MS Access
- Reading data with data reader and dataset objects
- Creating and deleting records, and editing data
- Displaying data with ASP.NET's web server controls
- Writing and using stored procedures from VB.NET code
- Placing your data access code in reusable class libraries
The book closes with a real-world case study that consolidates the tutorials throughout the book into a practical result.
Who is this book for?
To use this book, you need a computer running either Windows 2000 or Windows XP Professional Edition. The examples it contains will not run on Windows XP Home Edition.
This book is for people who have some experience of programming ASP.NET with Visual Basic .NET, are familiar with the operation of the .NET Framework, and want to learn how to use ASP.NET to make data-centric web applications. No prior knowledge of database programming is necessary.
Chapter 1. Displaying Data on the Web.
Chapter 2. Relational Databases.
Chapter 3. Connecting to a Data Source.
Chapter 4. Data Readers, Command Objects, and Web Server Controls.
Chapter 5. Reading Data using the DataSet Object.
Chapter 6. Creating and Inserting Records.
Chapter 7. Using and Deleting Records.
Chapter 8. Updating Stored Procedures.
Chapter 9. Data-Driven ASP.NET Applications in the Real World.
Chapter 10. Componentization.
Chapter 11. Performance.
Chapter 12. Writing an Application.
He has a Masters Degree in Computer Application. During leisure time, he enjoys driving, playing chess and watching games (Cricket, Basketball, Shuttle Badminton). You can reach Das at firstname.lastname@example.org.
Fabio Claudio Ferracchiati is a software developer and technical writer. In the early years of his ten-year career he worked with classical languages and old Microsoft tools like Visual Basic and Visual C++. After five years he decided to dedicate his attention to the Internet and related technologies. In 1998 he started a parallel career writing technical articles for Italian and international magazines. He works in Rome for CPI Progetti Spa (http://www.cpiprogetti.it) where he develops Internet/Intranet solutions using Microsoft technologies. Fabio would like to thank Wrox people who have given him the ch ance to write on this book, especially Alastair, for his kindness and consideration.
James Greenwood is a technical architect and author based in West Yorkshire, England. He spends his days (and most of his nights) designing and implementing .NET solutions from Government knowledge-management systems to mobile integration platforms, all the while waxing lyrical on the latest Microsoft technologies. His professional interests include research into distributed interfaces, the automation of application development, and human-machine convergence.
John Kauffman was born in Philadelphia, the son of a chemist and a nurse. John's family of six shared daily brain teasers and annual camping forays that covered most of the 50 United States. After jobs weeding strawberry patches, bussing tables, running spotlights for rock and roll concerts, touring North America with a drum and bugle corps, prematurely leaving three colleges, stuffing voles for a mammologist, packing boxes of rat poison, tarring roofs, delivering drapes in New York City, laboring in a candy factory, teaching canoeing, driving a forklift, studying tiger beetles in the Chihuahua desert, managing a picture framing factory, coaching a youth yacht racing team and volunteering as a human guinea pig for medical research, John (to the great relief of all around him) earned a pair of degrees in the sciences from The Pennsylvania State University and appeared to settle down. He then conducted research for Hershey Foods in the genetics of the cacao tree and the molecular biology of chocolate production. Subsequently he moved to the Rockefeller University where he identified, cloned and sequenced DNA regions which control the day and night biochemical cycles of plants.
Brian Matsik is the President and Senior Consultant at OOCS in Charlotte, NC and is currently a Microsoft Certified Solution Developer and Microsoft Certified Trainer. His experience with Visual Basic, VBScript, and VBA goes back to the DOS days and VB 2.0. Brian currently specializes in ASP, SQL Server, ADO, and VB COM. When he is not coding, training or writing he is either in his scuba gear or in the garage trying to turn perfectly good oak into perfectly good kindling.
Eric Mintz is a software analyst with over 20 years’ experience in a variety of technical and leadership positions. His ceaseless enthusiasm and curiosity have contributed to wide-ranging expertise, particularly in the areas of computer/human-interaction, data and object modelling, SQL, and Visual Basic. Currently, Eric is CEO of American Webware, Inc. in Atlanta where he resides with his wife and her three cats who all think he works way too hard. When he does have spare time, Eric likes to play jazz guitar and trumpet or go fly-fishing. Eric holds a BSEE, earned at the University of Houston, TX.
Jan D. Narkiewicz is Chief Technical Officer at Software Pronto, Inc (email@example.com). In his spare time Jan is Academic Coordinator for the Windows curriculum at U.C. Berkeley Extension, teaches at U.C. Santa Cruz Extension and writes for ASP Today.
Kent Tegels is a system developer and engineer working for HDR, Inc., a leading Engineering, Architecture and Consulting Firm. He is a Microsoft Certified Professional plus Site Builder, System Engineer (plus Internet) and Database Administrator.
John West is a Principal Consultant at Intellinet, based out of Atlanta, Georgia. He specializes in leading Microsoft .NET application development efforts. When not working, he usually spends his time reading, hanging out with friends from church, and trying to learn to wakeboard.
Donald Xie has 14 years experience in enterprise application development for various types of businesses. He is a co-author of "Professional CDO Programming" and a contributing author for a number of books. Donald currently works as a consulting system architect for the Department of Training in Western Australia, Australia. You can contact Donald at firstname.lastname@example.org.
|Code for all of the examples in the book, archived in ZIP format||451.92 KB||Click to Download|
Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.
|Access to sample database
A couple of readers have reported difficulty in getting access to the sample Northwind database from their ASP.NET applications. If this is happening to you, take a look at the following file, which should provide the help you need:
|**Warning about operating systems**
To use this book, you need a computer running Windows 2000 (any version) or Windows XP Professional Edition. The examples it contains will not run on Windows XP Home Edition
|7||245||Wrongly located source code
dgProducts.DataSource = ds.Tables(ProductTableName) dgProducts.DataBind()should correctly be located at the end of
|250||Wrongly located source code II
Similar to the error on page 245, the following two lines of code:
belong at the end of