 2006 Pearson Education, Inc. All rights reserved. 1 20 Database, SQL and ADO.NET.

Slides:



Advertisements
Similar presentations
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Advertisements

 Open the Paradise.exe file  Application displays records in the Books database  Allows the store manager to enter an author’s name (or part of a name)
 2003 Prentice Hall, Inc. All rights reserved. Chapter 22 – Database: SQL, MySQL, DBI and ADO.NET Outline 22.1 Introduction 22.2 Relational Database Model.
Chapter 14.3 LINQ to SQL Programming in Visual Basic 2010: The Very Beginner’s Guide by Jim McKeown Databases – Part 3.
Chapter 18 - Data sources and datasets 1 Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
1 Web-Enabled Decision Support Systems Advance Topics in Database Connectivity Prof. Name Position (123) University Name.
Chapter 12: Using ADO.NET 2.0 Programming with Microsoft Visual Basic 2005, Third Edition.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Using ADO.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
C# Programming: From Problem Analysis to Program Design1 Working with Databases C# Programming: From Problem Analysis to Program Design 3 rd Edition 14.
Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke.
CSCI 3328 Object Oriented Programming in C# Chapter 12: Databases and LINQ 1 Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
Chapter 18 Databases and LINQ Visual C# 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
From VS C# 2010 Programming, John Allwork 1 VS2010 C# Programming - DB intro 1 Topics – Database Relational - linked tables SQL ADO.NET objects Referencing.
Some Basic Database Terminology
Databases and LINQ Visual Basic 2010 How to Program 1.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
 2008 Pearson Education, Inc. All rights reserved Database: SQL, MySQL, ADO.NET 2.0 and Java DB.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introducing Web Controls Outline 29.1 Analyzing the.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Twelve Access Databases and LINQ.
1 Databound Controls. 2 Objectives You will be able to use design time data binding to display and update SQL Server database data without writing any.
CHAPTER EIGHT Accessing Data Processing Databases.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 30 – Bookstore Application: Client Tier Examining.
Connecting to Data Sources Using ADO.NET Dr. Awad Khalil Computer Science & Engineering Department AUC.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
CHAPTER EIGHT Accessing Data Processing Databases.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Module 7: Accessing Data by Using ADO.NET
Using Adapter Wizard ISYS 512. Data Adapter Wizard – 2 nd Level of Using ADO.Net Configure Data Adapter and generating a dataset: –From the Data tab of.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
Databases with LINQ. LINQ to SQL LINQ to SQL uses LINQ syntax to query databases. LINQ to SQL classes are automatically generated by the IDE’s LINQ to.
1 Chapter 20 – Data sources and datasets Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
Mauricio Featherman, Ph.D. Washington St. University
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
Chapter Fourteen Access Databases and SQL Programming with Microsoft Visual Basic th Edition.
 2008 Pearson Education, Inc. All rights reserved Database: SQL, MySQL, ADO.NET 2.0 and Java DB.
Databases and ADO.NET Programming Right from the Start with Visual Basic.NET 1/e 11.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 25 I’m Suffering from Information Overload.
 2009 Pearson Education, Inc. All rights reserved Databases and LINQ to SQL.
ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.
CSCI 3328 Object Oriented Programming in C# Chapter 12: Databases and LINQ – Exercises 1 Xiang Lian The University of Texas Rio Grande Valley Edinburg,
ADO.NET Objects Data Adapters Dr. Ron Eaglin. Agenda Builds on Information in Part I Should have working knowledge of creating a database connection Continuation.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 350.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
Chapter Fourteen Access Databases and SQL Programming with Microsoft Visual Basic th Edition.
Chapter 9 Working with Databases. Copyright © 2011 Pearson Addison-Wesley Introduction In this chapter you will learn: – Basic database concepts – How.
Creating SQL Database file And Displaying a Database Table in a DataGridView.
Chapter 9 Working with Databases. Copyright © 2011 Pearson Addison-Wesley Binding to ListBox and ComboBox Controls List and combo boxes are frequently.
Programming with Microsoft Visual Basic 2012 Chapter 14: Access Databases and SQL.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Integrating Data Lesson 6.
Common SQL keywords. Building and using CASE Tools Data Base with Microsoft SQL-Server and C#
Database, SQL and ADO.NET
Visual Basic 2010 How to Program
© 2016, Mike Murach & Associates, Inc.
 2012 Pearson Education, Inc. All rights reserved.
Brief description on how to navigate within this presentation (ppt)
CIS16 Application Programming with Visual Basic
Database Applications
Chapter 10 Accessing Database Files
Presentation transcript:

 2006 Pearson Education, Inc. All rights reserved Database, SQL and ADO.NET

 2006 Pearson Education, Inc. All rights reserved. 2 It is a capital mistake to theorize before one has data. — Arthur Conan Doyle Now go, write it before them in a table, and note it in a book, that it may be for the time to come for ever and ever. — Holy Bible, Isaiah 30:8 Get your facts first, and then you can distort them as much as you please. — Mark Twain I like two kinds of men: domestic and foreign. — Mae West

 2006 Pearson Education, Inc. All rights reserved. 3 OBJECTIVES In this chapter you will learn:  The relational database model.  To write basic database queries in SQL.  To add data sources to projects.  To use the IDE's drag-and-drop capabilities to display database tables in applications.  To use the classes of namespaces System.Data and System.Data.SqlClient to manipulate databases.  To use ADO.NET's disconnected object model to store data from a database in local memory.  To create XML documents from data sources.

 2006 Pearson Education, Inc. All rights reserved Introduction 20.2 Relational Databases 20.3 Relational Database Overview: Books Database 20.4 SQL Basic SELECT Query WHERE Clause ORDER BY Clause Merging Data from Multiple Tables: INNER JOIN INSERT Statement UPDATE Statement DELETE Statement 20.5 ADO.NET Object Model

 2006 Pearson Education, Inc. All rights reserved Programming with ADO.NET: Extracting Information from a Database Displaying a Database Table in a DataGridView How Data Binding Works 20.7Querying the Books Database 20.8 Programming with ADO.NET: Address Book Case Study 20.9 Using a DataSet to Read and Write XML 20.10Wrap-Up 20.11Web Resources

 2006 Pearson Education, Inc. All rights reserved. 6 Fig | Adding a data source to a project. Data Sources windowData menu

 2006 Pearson Education, Inc. All rights reserved. 7 Fig | Choosing the data source type in the Data Source Configuration Wizard.

 2006 Pearson Education, Inc. All rights reserved. 8 Fig | Adding a new data connection.

 2006 Pearson Education, Inc. All rights reserved. 9 Fig | Choosing the Books.mdf data connection.

 2006 Pearson Education, Inc. All rights reserved. 10 Fig | Saving the connection string to the application configuration file.

 2006 Pearson Education, Inc. All rights reserved. 11 Fig | Choosing the database objects to include in the DataSet.

 2006 Pearson Education, Inc. All rights reserved. 12 Fig | Viewing a data source listed in the Data Sources window. Data Sources window

 2006 Pearson Education, Inc. All rights reserved. 13 Fig | Viewing a database listed in the Solution Explorer.

 2006 Pearson Education, Inc. All rights reserved. 14 Fig | Design view after dragging the Authors data source node to the Form. authorsBindingNavigator authorsDataGridView Component tray

 2006 Pearson Education, Inc. All rights reserved. 15 Fig | Displaying the Authors table in a DataGridView. Move to first row Move to next row Move to previous row Move to last row (a) Delete the current row Add a new row Save changes (b) Currently selected row

 2006 Pearson Education, Inc. All rights reserved. 16 Fig | Data binding architecture used to display the Authors table of the Books database in a GUI.

 2006 Pearson Education, Inc. All rights reserved. 17 Outline DisplayTable.cs (1 of 2)

 2006 Pearson Education, Inc. All rights reserved. 18 Outline DisplayTable.cs (2 of 2) (a) (b)

 2006 Pearson Education, Inc. All rights reserved. 19 Fig | Viewing the BooksDataSet in the Dataset Designer. Dataset Designer TitlesTableAdapter

 2006 Pearson Education, Inc. All rights reserved. 20 Fig | TableAdapter Query Configuration Wizard to add a query to a TableAdapter.

 2006 Pearson Education, Inc. All rights reserved. 21 Fig | Choosing the type of query to be generated for the TableAdapter.

 2006 Pearson Education, Inc. All rights reserved. 22 Fig | Specifying a SELECT statement for the query.

 2006 Pearson Education, Inc. All rights reserved. 23 Fig | Query Builder after adding a WHERE clause by entering a value in the Filter column. (Part 1 of 2.) (a)

 2006 Pearson Education, Inc. All rights reserved. 24 Fig | Query Builder after adding a WHERE clause by entering a value in the Filter column. (Part 2 of 2.) (b)

 2006 Pearson Education, Inc. All rights reserved. 25 Fig | The SELECT statement created by the Query Builder.

 2006 Pearson Education, Inc. All rights reserved. 26 Fig | Specifying names for the methods to be added to the TitlesTableAdapter.

 2006 Pearson Education, Inc. All rights reserved. 27 Fig | Dataset Designer after adding Fill and Get methods to the TitlesTableAdapter.

 2006 Pearson Education, Inc. All rights reserved. 28 Outline DisplayQuery Result.cs (1 of 5)

 2006 Pearson Education, Inc. All rights reserved. 29 Outline DisplayQuery Result.cs (2 of 5)

 2006 Pearson Education, Inc. All rights reserved. 30 Outline DisplayQuery Result.cs (3 of 5)

 2006 Pearson Education, Inc. All rights reserved. 31 Outline DisplayQuery Result.cs (4 of 5) (b) (a)

 2006 Pearson Education, Inc. All rights reserved. 32 Outline DisplayQuery Result.cs (5 of 5) (c)

 2006 Pearson Education, Inc. All rights reserved. 33 Outline AddressBook.cs (1 of 3)

 2006 Pearson Education, Inc. All rights reserved. 34 Outline AddressBook.cs (2 of 3)

 2006 Pearson Education, Inc. All rights reserved. 35 Outline AddressBook.cs (3 of 3) (b)(a) (c)

 2006 Pearson Education, Inc. All rights reserved. 36 Fig | Selecting the control(s) to be created when dragging and dropping a data source member onto the Form.

 2006 Pearson Education, Inc. All rights reserved. 37 Fig | Displaying a table on a Form using a series of Label s and TextBox es.

 2006 Pearson Education, Inc. All rights reserved. 38 Fig | Dataset Designer for the AddressBookDataSet after adding a query to AddressesTableAdapter.

 2006 Pearson Education, Inc. All rights reserved. 39 Fig | Design view after adding controls to locate a last name in the address book.

 2006 Pearson Education, Inc. All rights reserved. 40 Fig | Viewing the DataBindings.Text property of a TextBox in the Properties window.

 2006 Pearson Education, Inc. All rights reserved. 41 Outline XMLWriter.cs (1 of 3)

 2006 Pearson Education, Inc. All rights reserved. 42 Outline XMLWriter.cs (2 of 3)

 2006 Pearson Education, Inc. All rights reserved. 43 Outline XMLWriter.cs (3 of 3)

 2006 Pearson Education, Inc. All rights reserved. 44 Outline Players.xml