Browser (Client Side) 瀏覽器 (客戶端)

Slides:



Advertisements
Similar presentations
ADO.Net Modelo para acesso a dados nas aplicação.Net Componentes: DataSet.Net Data providers: Connection Command DataReader DataAdapter.
Advertisements

PENGOLAHAN DATABASE MENGGUNAKAN VB.NET
By Chris Pascucci and FLF
VB.NET Database Access ISYS546. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
Database Access Using ADO.NET
ASP.NET and ADO.NET. ASP.NET Server Controls Intrinsic Controls: These controls correspond to their HTML counterparts. –Ex. Textbox, listbox, button,
1 ADO.NET. 2.NET Framework Data Namespaces System.Data –Base set of classes and interfaces for ADO.NET System.Data.Common –Classes shared by the.NET Data.
ADO. NET. What is “ADO.Net”? ADO.Net is a new object model for dealing with databases in.Net. Although some of the concepts are similar to the classical.
ASP.NET Database Connectivity I. 2 © UW Business School, University of Washington 2004 Outline Database Concepts SQL ASP.NET Database Connectivity.
VB.NET Database Access ISYS 812. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
Introduction to ADO.NET. ADO.NET Objects Data Set.NET Applications Data Reader Command Object Connection Object Managed Data Provider (OLEDB) Database.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
VB.NET Database Access ISYS546. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS546.
Lecture 11: Programmatic Database Access with ADO.NET.
VB.NET Database Access ISYS546. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
C# programming with database Basic guideline. First step Install SQL Server 2008/2010 (Professional edition if possible) Install Visual Studio 2008/2010.
Chapter 9 Using the SqlDataSource Control. References aspx.
Chapter 11 Introduction to Database Processing. Class 11: Database Processing Use a Visual Studio Wizard to establish a database connection used to load.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
ODBC, OLE DB, and ADO Introduction Dr. Ron Eaglin.
ASP.NET Part 4 Instructor: Charles Moen CSCI/CINF 4230.
1 Introducing Database Access from Web Applications by Sally Kyvernitis.
Pemrograman VisualMinggu …10… Page 1 MINGGU Ke Sepuluh Pemrograman Visual Pokok Bahasan: ADO.NET II Tujuan Instruksional Khusus: Mahasiswa dapat menjelaskan.
CIS 451: Using ASP.NET Objects with SQL Dr. Ralph D. Westfall February, 2009.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Needs for Accessing Database To make your web site more dynamic and maintainable, you can display information on your web pages that are retrieved from.
Chapter 13 Database Access Using ADO.NET
Neal Stublen Populating a Database  SQLExpress should be installed with Visual Studio  The book provides a.sql file for populating.
.NET Data Access and Manipulation ADO.NET. Overview What is ADO.NET? Disconnected vs. connected data access models ADO.NET Architecture ADO.NET Core Objects.
1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL ADO.Net Basics Ruwan Wijesinghe Trainer.
ASP.NET Rina Zviel-Girshin Lecture 5
Module 9: Accessing Relational Data Using Microsoft Visual Studio.NET.
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
1 UCN Technology: Computer Science: Autumn 2012 ADO.NET 2.0 Architecture DataReader DataSet Connection factory Config file.
1.Net programmingADO.NETNOEA / PQC ADO.NET Architecture Connection factory Config file DataReader DataSet DataGrid Autogeneration of SQL.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
 It is the primary data access model for.Net applications  Next version of ADO  Can be divided into two parts ◦ Providers ◦ DataSets  Resides in System.Data.
1 Data Classes- DataView DataGridView Control. Objectives 2  Data Class  DataAdapter  DataReader  DataSet  DataTable  DataView  DataGridView Control.
CIS 375—Web App Dev II ASP.NET 9 Database. 2 ADO.NET What is ADO.NET? ADO.NET is a part of the.NET Framework ADO.NET consists of a set of classes used.
Company Confidential 1 Working with Data and ADO.Net.
Distributed Database Systems INF413. ADO.NET is a set of classes that comes with the Microsoft.NET framework to facilitate data access from managed languages.
Module 3: Working with Local Data. Overview Using DataSets Using XML Using SQL Server CE.
HNDIT Rapid Application Development
Databases – Unit 3 & 4.  SQL is not restricted to a specific database, however in class we will be looking at the two major database programmes in use.
2314 – Programming Language Concepts Introduction to ADO.NET.
ADO.NET in VB.NET 2005 ITE 370 4/26/2017.
DataGridView. Displaying data in a tabular format is a task you are likely to perform frequently. The DataGridView control is designed to be a complete.
Module 2: Using ADO.NET to Access Data. Overview ADO.NET Architecture Creating an Application That Uses ADO.NET to Access Data Changing Database Records.
Using Database: A very, very short introduction..
Querying Information in a Database. CONTENTS Relational Database Systems Creating Database with SQL Server Reading Data with LINQ Requirements to Get.
Data Access. ADO.NET ADO.NET is the primary library for building database solutions within the.NET Framework. ADO.NET does not replace ADO. ADO and OLEDB.
.NET Data Access and Manipulation
Coding ADO.NET Objects: Connection, Command, DataReader.
C# 1 CSC 298 ADO.NET. C# 2 ADO.NET  A data access technology that maps very well to the world of the web (disconnected architecture)  data is retrieved.
C# MySQL onnect-C-to-MySQL 1.
Lecture Select Operation 2. Insert Operation 3. Update Operation 4. Delete Operation.
Introduction to ADO.NET
Accessing Databases using Ado.net
Chapter 15 Using a Database.
ADO.NET and Stored Procedures
ADO.NET Framework.
Lecture 6 VB.Net SQL Server.
ASP.NET and ADO.NET.
VB.NET Using Database.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
برنامه نویسی سیستم های شی گرا
04 | Data Acess Technologies
Command Object’s ExecuteNonQuery Method
Presentation transcript:

Browser (Client Side) 瀏覽器 (客戶端) DataGridView TextBox, MsgBox DataSet (DataTable) DataReader DataAdapter 1. SelectCommand 2. InsertCommand 3. UpdateCommand 4. DeleteCommand Command Connection DataBase 資料庫

Connection  DataAdapter  DataSet  DataGridView using System.Data; using System.Data.OleDb; OleDbConnection connection1 = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=battles.mdb;"); connection1.Open(); OleDbDataAdapter oleDbDataAdapter1 = new OleDbDataAdapter(); DataSet ds = new DataSet(); String s = "select * from ships"; oleDbDataAdapter1.SelectCommand = new OleDbCommand (s, connection1); oleDbDataAdapter1.Fill(ds); 1 DataGrid dataGridView1 = new DataGridView(); dataGridView1.DataSource = ds.Tables["ships"]; 2 DataGrid dataGrid1 = new DataGrid(); dataGrid1.DataSource = ds; dataGrid1.CaptionText = "Ships";

Connection  Command  DataReader  TextBox using System.Data; using System.Data.OleDb; OleDbConnection connection1 = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=battles.mdb;"); connection1.Open(); String s = "select * from ships"; OleDbCommand cmd = new OleDbCommand(s, connection1); OleDbDataReader reader = cmd.ExecuteReader(); for(i=0; i<reader.FieldCount(); i++) textBox1.Text += reader.GetName(i) + "\t"; // field name textBox1.Text += Environment.NewLine; while( reader.Read() ){ // ~fgets for(i=0; i<reader.FieldCount(); i++) textBox1.Text += reader.GetValue(i) + "\t"; // data textBox1.Text += Environment.NewLine; } textBox1.Text = reader["country"].ToString();

Connection  Command  DataReader  TextBox using System.Data; using System.Data.OleDb; OleDbConnection connection1 = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=battles.mdb;"); connection1.Open(); String s = "insert into ships values ('A','shipA')"; OleDbCommand cmd = new OleDbCommand(s, connection1); OleDbDataReader reader = cmd.ExecuteNonQuery(); String s = "update ships set ship='shipB' where ship='shipA'"; OleDbCommand cmd = new OleDbCommand(s, connection1); OleDbDataReader reader = cmd.ExecuteNonQuery(); String s = "delete from ships where country='A'"; OleDbCommand cmd = new OleDbCommand(s, connection1); OleDbDataReader reader = cmd.ExecuteNonQuery();

OleDbCommand cmd = connection1.CreateCommand(); try { cmd.CommandText = "drop table temp;"; cmd.ExecuteNonQuery(); } catch (Exception ex)