Beginning C# 2008 Databases From Novice to Professional phần 1 potx

42 344 0
Beginning C# 2008 Databases From Novice to Professional phần 1 potx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

this print for content only—size & color not accurate spine = 0.9682" 512 page count Books for professionals By professionals ® Beginning C# 2008 Databases: From Novice to Professional Dear Reader, This book focuses on accessing databases using C# 2008 as a development tool in conjunction with the new release of Visual Studio 2008 and.NET Framework 3.5. This book will walk you through all the aspects of programming a database with SQL Server 2005, pulling the data to an application developed using C# 2008. As you work your way through this book, you get a chance to explore the concepts covered by creating sample applications in “Try It Out” sections, which will help you to apply what you learn to your real-world applications. Following the sample applications, I explain each code statement in “How It Works” sections to help you understand the code. I hope that you will achieve not only knowledge of C# 2008, but also knowledge of SQL Server 2005. I have targeted quite a few database concepts, from the basics to the new T-SQL features of SQL Server 2005. This book will also help you to build your code competency in a gradual manner because I begin with the easy topics before moving on to the complex ones. This book starts from basic application development and goes over the concepts of LINQ and ADO. NET 3.5 and building applications with them. I believe that you will find this book to be an asset in enriching your data- base application development skills. Cheers, Vidya Vrat Agarwal Vidya Vrat Agarwal, author of Beginning VB 2008 Databases: From Novice to Professional US $39.99 Shelve in Programming Languages/C# User level: Beginner–Intermediate Agarwal, Huddleston C# 2008 Databases The eXperT’s Voice ® in .neT Beginning C# 2008 Databases From Novice to Professional cyan MaGenTa yelloW Black panTone 123 c Vidya Vrat Agarwal and James Huddleston Ranga Raghuram, Syed Fahad Gilani, Jacob Hammer Pedersen, and Jon Reid Companion eBook Available THE APRESS ROADMAP Expert C# 2008 Business Objects, Third Edition Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition Beginning C# 2008 Databases: From Novice to Professional www.apress.com SOURCE CODE ONLINE Companion eBook See last page for details on $10 eBook version ISBN-13: 978-1-59059-900-6 ISBN-10: 1-59059-900-4 9 781590 599006 5 3 9 9 9 What every C# programmer needs to know about SQL Server 2005, T-SQL, ADO.NET 3.5, and LINQ James Huddleston, author of Beginning VB 2005 Databases: From Novice to Professional Beginning C# 2005 Databases: From Novice to Professional Beginning [...]... 11 1 Try It Out: Executing a Stored Procedure with Parameters 11 1 How It Works 11 4 Deleting Stored Procedures 11 5 Try It Out: Deleting a Stored Procedure 11 5 How It Works 11 6 Summary 11 7 s... 10 2 Modifying Stored Procedures 10 3 Try It Out: Modifying the Stored Procedure 10 3 How It Works 10 5 9004fmfinal.qxd 12 /14 /07 11 :10 AM Page xi sCONTENTS Displaying Definitions of Stored Procedures 10 6 Try It Out: Viewing the Definition of Your Stored Procedure 10 6 How... Constructor 210 How It Works 211 Associating a Command with a Connection 211 Assigning Text to a Command 213 xiii 9004fmfinal.qxd xiv 12 /14 /07 11 :10 AM Page xiv sCONTENTS Executing Commands 215 Try It Out: Using the ExecuteScalar Method 216 ... machine’s desktop), and click Save 4 When the download is complete, click Close 5 Now run the AdventureWorksDB.msi file to start the installation process A message box will be followed by the Welcome window (see Figure 1- 9) Click Next Figure 1- 9 AdventureWorks InstallShield Wizard Welcome window 9 9004ch01final.qxd 12 /13 /07 4:23 PM Page 11 CHAPTER 1 s GETTING YOUR TOOLS Figure 1- 11 Connecting to the server... Server Management Studio Express will open as shown in Figure 1- 12 Rightclick the Databases node in Object Explorer (located on the left side), and click Attach in the context menu Figure 1- 12 SQL Server Management Studio Express 3 In Attach Database window, click Add 11 9004ch01final.qxd 12 12 /13 /07 4:23 PM Page 12 CHAPTER 1 s GETTING YOUR TOOLS 4 In the Locate Database Files window, select the file... 13 3 Summary 13 3 73ed30358d 714 f26dd2d9c 015 9f8cfe0 xi 9004fmfinal.qxd xii 12 /14 /07 11 :10 AM Page xii sCONTENTS s CHAPTER 8 Understanding Transactions 13 5 What Is a Transaction? 13 5 When to Use Transactions 13 6 Understanding... 12 3 Using FOR XML RAW 12 4 Using FOR XML AUTO 12 8 Using the xml Data Type 13 0 Try It Out: Creating a Table to Store XML 13 0 How It Works 13 1 Try It Out: Storing and Retrieving XML Documents 13 1 How It... sqlcmd interactively 1 At the command prompt, enter the following command, which runs sqlcmd and connects to the SQLEXPRESS instance (see Figure 1- 6): sqlcmd -S \sqlexpress Figure 1- 6 Connecting to SQLEXPRESS with sqlcmd 7 9004ch01final.qxd 8 12 /13 /07 4:23 PM Page 8 CHAPTER 1 s GETTING YOUR TOOLS 2 At the sqlcmd prompt (1> ), enter the following T-SQL: use northwind select count(*) from employees go The... gratitude to those two who are an integral part of my life for accompanying me throughout the eight-month journey of completing this book: my wife, Rupali, and my two-year-old daughter, Vamika (“Pearly”) Many thanks to you for xxv 9004fmfinal.qxd 12 /14 /07 11 :10 AM Page xxvii Introduction B ecause most real-world applications interact with data stored in relational databases, every C# programmer needs to know... this file to a location on your host PC (such as on the desktop) When the download of the file is complete, click Close 5 Run the SQLServer2005_SSMSEE.msi setup file to start the installation process The Welcome window shown in Figure 1- 1 will appear Click Next Figure 1- 1 Welcome window for installing SQL Server Management Studio Express 3 9004ch01final.qxd 4 12 /13 /07 4:23 PM Page 4 CHAPTER 1 s GETTING . Huddleston Ranga Raghuram, Syed Fahad Gilani, Jacob Hammer Pedersen, and Jon Reid Beginning C# 2008 Databases From Novice to Professional 9004fmfinal.qxd 12 /14 /07 11 :10 AM Page i Beginning C# 2008. LINQ James Huddleston, author of Beginning VB 2005 Databases: From Novice to Professional Beginning C# 2005 Databases: From Novice to Professional Beginning

Ngày đăng: 08/08/2014, 18:21

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan