Cover image for Database programming with visual basic .NET and ADO.NET : tips, tutorials, and code
Title:
Database programming with visual basic .NET and ADO.NET : tips, tutorials, and code
Personal Author:
Publication Information:
Indianapolis, IN : Sams, 2003
ISBN:
9780672322471

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010069461 QA76.9.D3 B374 2003 Open Access Book Book
Searching...

On Order

Summary

Summary

The topic combination of VB .NET and ADO.NET is unbeatable. VB .NET is the most popular language in which to code. And, every developer needs to understand ADO.NET to allow data to be accessed from a Web site. In this book Developers will be shown numerouse code examples that will illustrate how to program database driven applications within the .NET Framework. The book is aimed at both established and new VB Developers. Important topics covered include: Visual Studio development environment, ASP.NET applications, Windows Forms application, using VB .NET with ADO.NET, complex queries, security, COM interop., and application deployment.


Author Notes

F. Scott Barker has worked as a database developer for more than 15 years


Table of Contents

Introductionp. 1
Who Is This Book For?p. 1
What's Covered in Database Programming with Visual Basic .NET and ADO.NET: Tips, Tutorials, and Code?p. 2
Chapter 1 Developing Windows Forms Using Bound Controlsp. 5
1.1 Create a Bound List Boxp. 6
1.2 Limit the Data Displayed in a Bound List Boxp. 12
1.3 Bind and View Individual Text Boxes Based Off a Selected List Box Itemp. 15
1.4 Edit and Update Data Using Bound Controlsp. 20
1.5 Add and Delete Records Using Bound Controlsp. 26
1.6 Take Care of Error Handling with Bound Controlsp. 30
1.7 Put the Finishing Touches on a Data Bound Formp. 35
1.8 Bind Data to ComboBox and DataGrid Controlsp. 40
1.9 Drill Down to Data in the DataGrid Controlp. 43
Chapter 2 Creating SQL Server Database Objects from Visual Studio .NETp. 49
Working with Tables, Columns, and Rowsp. 49
Utilizing Properties for Tables and Columnsp. 50
2.1 Create a New SQL Server Database from Within Visual Studio .NETp. 51
2.2 Define Tables and Fieldsp. 53
2.3 Define a Primary Key and Other Indexesp. 57
2.4 Define Relations Between Tablesp. 60
2.5 Define Defaults and Constraintsp. 64
2.6 Create Viewsp. 66
2.7 Create Stored Proceduresp. 70
Chapter 3 Viewing Data with ADO.NETp. 73
Differences Between ADO and ADO.NETp. 73
Objects That Are Found in ADO.NETp. 74
3.1 Retrieve Data by Using the DataReader Objectp. 77
3.2 Retrieve Results from SQL Server by Using the DataTable Objectp. 81
3.3 Locate Records with the DataTable Objectp. 83
3.4 Filter and Sort Records Using the DataView Objectp. 87
Chapter 4 Manipulating Data with ADO.NETp. 95
4.1 Edit Data and Update Changes That Are Made to an ADO.NET DataSet Objectp. 95
4.2 Add and Delete Rows in a Dataset with ADO.NETp. 104
4.3 Execute Parameterized Stored Procedures in ADO.NETp. 108
4.4 Create and Execute On-the-Fly Batch Updates by Using ADO.NETp. 111
Chapter 5 Working with Data in Web Formsp. 115
Dealing with Stateless Programmingp. 115
5.1 Use Bound Controls with Web Formp. 117
5.2 Validate Data Using Validation Controlsp. 123
5.3 Populate DropDown and ListBox Controlsp. 128
5.4 Display Data Using the Table Controlp. 133
5.5 Display Data Using the Repeater Controlp. 138
5.6 Display, Sort, and Page Data in the DataGrid Controlp. 145
5.7 Add, Edit, and Delete Data Using the DataGrid Controlp. 150
5.8 Hyperlink from a Row in the Data Grid to a Detail Pagep. 160
Chapter 6 Creating Transact-SQL Commandsp. 165
6.1 Retrieve Unique Records Using Only a Select Queryp. 166
6.2 Use Variables and Functions in T-SQLp. 169
6.3 Use Wildcards and Ranges of Values in a SQL Queryp. 172
6.4 Find Records in a Table Without Corresponding Entries in a Related Table?p. 176
6.5 Take Advantage of Using Subqueriesp. 179
6.6 Create, Modify, and Delete Tablesp. 182
6.7 Create a New Table with Data from Existing Tables?p. 188
6.8 Create and Call SQL Server 2000 User-Defined Functionsp. 191
Chapter 7 Performing Common Database Tasks Using SQL-DMOp. 197
Looking at the SQL Server DMF APIsp. 199
Setting References in .NET for the SQL APIsp. 200
7.1 Create a Dialog Box to Connect to a New Database, Including Listing Available SQL Servers and Databasesp. 200
7.2 Back Up and Verify a SQL Server Databasep. 208
7.3 Restore a SQL Server Databasep. 216
7.4 Transfer Tables Between SQL Server Databasesp. 220
7.5 Create a Detach/Attach SQL Server Database Dialog Boxp. 227
Chapter 8 Taking Advantage of Data-Driven Techniquesp. 235
8.1 Work with Data-Bound Multi-Select List Boxes Using Windows Formsp. 237
8.2 Use a Single Windows Form to Update Multiple Lookup Tablesp. 245
8.3 Create a Point-and-Click SQL Server Query Tool for Users Using a Windows Formp. 250
8.4 Make a Generic Search Form in a Visual Basic .NET Desktop Applicationp. 257
8.5 Work with Data-Bound Multi-Select List Boxes Using Web Formsp. 267
8.6 Use a Single Web Form to Update Multiple Lookup Tablesp. 276
8.7 Create a Point-and-Click Query Tool for Users Using a Web Formp. 291
8.8 Make a Generic Search Form in an ASP.NET Web Applicationp. 299
Chapter 9 Using Classes with Databases to Make Life Easierp. 309
9.1 Define a Class in Visual Basic .NETp. 310
9.2 Create a Class That Implements the Interface You Definedp. 316
9.3 Use Visual Studio .NET Tools to Speed Up Writing ADO.NET Codep. 322
9.4 Control the Creation and Behavior of Classesp. 333
9.5 Implement the Methods That Update the Databasep. 338
9.6 Validate Data Passed to Properties and Communicate Errors to Developersp. 347
9.7 Write Data Validation Code That Can Be Reused in Other Classesp. 353
Chapter 10 Creating Reports Using Crystal Reportsp. 367
10.1 Create a Report Using Crystal Reports Report Expertp. 368
10.2 Display a Report That Was Createdp. 374
10.3 Add Calculated Fields to the Crystal Reports Reportp. 378
10.4 Select Whether the Report Will Be Displayed, Printed, or Exported Using Visual Basic .NET Codep. 381
10.5 Determine Which Records Will Be Printed at Runtimep. 385
10.6 Print Labels and Control the Order in Which Records Will Be Printedp. 389
10.7 Create an Onscreen Report That Contains Hyperlinksp. 394
Chapter 11 Managing SQL Server Securityp. 397
11.1 Create Windows NT/2000 Usersp. 398
11.2 Create Windows NT/2000 Groupsp. 401
11.3 Establish a Windows NT/2000 Authentication Modep. 403
11.4 Establish Mixed-Mode Authenticationp. 406
11.5 Create a Standard Loginp. 408
11.6 Create a Windows NT/2000 Loginp. 410
11.7 Use a Fixed Server Rolep. 412
11.8 Create a Database User Accountp. 415
11.9 Use Statement Permissionsp. 417
11.10 Use Object Permissionsp. 419
11.11 Use Fixed Database Rolesp. 421
11.12 Create Custom Database Rolesp. 424
11.13 Create Application Rolesp. 427
Chapter 12 Utilizing XML Data in Your Visual Basic .NET Applicationsp. 429
Ways of Utilizing XML in .NETp. 429
XML Namespaces in .NETp. 430
12.1 Use XMLWriter to Create an XML Documentp. 430
12.2 Use XMLReader to Read an XML Documentp. 436
12.3 Work with the XML Document Object Modelp. 439
12.4 Retrieve XML from SQL Server 2000p. 445
12.5 Work with Datasets and XMLp. 448
Chapter 13 Creating XML Web Servicesp. 453
Overview of the XML Web Services Infrastructurep. 454
13.1 Get Started with XML Web Servicesp. 455
13.2 Create a Simple XML Web Service Using Parametersp. 462
13.3 Consume XML Web Servicesp. 466
13.4 Pass a Dataset Back from an XML Web Servicep. 470
Appendix A Desktop Development with ADOp. 475
When to Use ADO (Local Database/Single Tier Applications)p. 475
Looking At the ADO Object Modelsp. 476
Referencing the Type Librariesp. 477
Using the Connection Objectp. 478
Working with the ADO Recordset Objectp. 481
Executing a SQL Server Stored Procedure By Using ActiveX Data Objectsp. 485
Executing Batch Updates with ADO and SQL Serverp. 486
Creating SQL Server Objects with ActiveX Data Objectsp. 488
Conclusionp. 490
Indexp. 491