C# ASP.NET ADO.NET JAVASCRIPT JQUERY AJAX SILVERLIGHT WPF
C# OOPS HTML&CSS DHTML ASP.NET ADO.NET JAVASCRIPT JQUERY AJAX SILVERLIGHT MVVM WPF SQL SERVER Photoshop Dreamweaver Flash Illustrator
Blog Archive
-
2012
(83)
- September(2)
-
August(81)
- Important WPF Classes and Namespaces
- Applications of WPF
- Programming With WPF
- Limitations of Silverlight and flash
- Silverlight Feature comparison with Flash Features
- How to Add XML File in Your Silverlight Project
- 3 Pixel Shader Effects in Silverlight
- Rotate Image in 3D direction using Silverlight
- First Application of Silverlight
- Silverlight 2.0
- How Install Ajax?
- Ajax Advantage
- JavaScript Loops
- Show a Military Clock and ordinary clock
- How To validate a Form in ASP. Net
- How to show Day of Week
- How to Swap a Image using JavaScript
- Special Character in JavaScript
- Prompt Box in JavaScript
- The use of data adapter.?
- The steps involved to fill a dataset?
- Dataset object in ADO .NET
- Handling Connection Events
- The SQLCONNECTION OBJECT
- Command Constructors
- The SQLCOMMAND OBJECT
- Gridview in ASP.NET
- Introduction Of Master Page
- Server Side State Management
- Query String In ASP.NET
- Cookies in ASP.NET
- State Management in ASP.NET
- Various types of application that we can develop i...
- Properties
- Inheritance ,Polymorphism
- Array,Indexer and Collections
- Control Statements
- Operators, types and variables in C#
- Fundamental of C#
- C# & other Programming Languages
- The WPF Designer
- C# DataTypes
- What is Ajax?
- Silverlight 1.0
- Confirm Box in JavaScript
- Component classes
- Life Cycle of ASP.NET
- The Basics of JQuery
- Jquery Blog Content
- Birth Of WPF
- .Net Frameworks Architecture
- History Of Ajax
- Why Silverlight?
- How to access a URL of parent page in ASP. net
- THE ADO.NET Architecture?
- Architecture of ASP.NET
- Introduction Of Ajax
- Ajax Blog Content
- Introduction of SilverLight
- Silverlight Blog Content
- Introduction to Javascript Blog
- Javascript Blog Content
- Introduction to Ado.Net blog
- Ado.Net Blog Content
- Introduction to C# Blog
- C# Blog Content
- Introduction to Asp.Net
- Asp.Net Blog Content
- Introduction to WPF
- WPF Blog Content
- WPF Interview Question
- Silverlight Interview Question
- Ajax Interview Question
- JQuery Interview Question
- Javascript Interview Question
- DHTML Interview Question
- Ado.Net Inetview Questions
- SQL Interview Questions
- HTML&CSS Interview Questions
- Asp.Net Interview Qusetions
- C# Interview Questions
Dataset object in ADO .NET
Dataset object in ADO .NET
The DataSet object is a disconnected storage.DataSet is a disconnected in-memory representation of data. It can be considered as a local copy of the relevant portions of the database. The DataSet is persisted in memory and the data in it can be manipulated and updated independent of the database. It represents related tables, constraints, and relationships among the tables. DataSet reads and writes data and schema as XML documents.The DataSet object is a disconnected storage.It is used for manipulation of relational data. The DataSet is filled with data from the storeWe fill it with data fetched from the data store. Once the work is done with the dataset, connection is reestablished and the changes are reflected back into the store.

ADO.NET DataSet can contain more than one table and also contains information about table relationships, the columns they contain, and any constraints that apply. Each table in a DataSet can contain multiple rows. Once data is retrieved from the database into a DataSet object, an application can disconnect from the database before processing the DataSet. This is an important feature of the ADO.NET DataSet. It gives us an in-memory, disconnected copy of a portion of the database which we can process without retaining an active connection to the database server.
Creating and using a DataSet
The typical steps in creating and using a DataSet are:
(i)Create a DataSet object
(ii) Connect to a database
(iii)Fill the DataSet with one or more tables or views
(iv)Disconnect from the database
(v)Use the DataSet in the application

Example of DataSet
using System;
using System.Data;
using System.Data.SqlClient;
public class empcount {
public static void Main() {
// change the following connection string, as necessary...
string con =
@"server=(local)\kamal;database=Emp;trusted_connection=yes";
DataSet ds = new DataSet("EmpDataSet");
SqlDataAdapter sad;
string sl;
sl = "SELECT COUNT(*) AS cnt FROM employee";
sad = new SqlDataAdapter(sl, con);
sad.Fill(ds, "emp_count");
sl = "SELECT COUNT(*) AS cnt FROM compocation";
sad = new SqlDataAdapter(sl, con);
sad.Fill(ds, "comploc_count");
int totalemp = (int) ds.Tables["emp_count"].Rows[0]["cnt"];
int comploc = (int) ds.Tables["comploc_count"].Rows[0]["cnt"];
Console.WriteLine(
"There are {0} employee, {1} complocation .",
totalemp ,
comploc,
);
}
}
|









