0% found this document useful (0 votes)
3 views7 pages

ADO.NET Database Operations Guide

ADO.NET provides a framework for accessing and manipulating databases through operations such as connecting, selecting, and modifying data. It utilizes components like Connection, Command, DataReader, DataAdapter, DataTable, and DataRow to facilitate these tasks. The document outlines the steps for creating a connection, executing commands, and managing data within a database using ADO.NET.

Uploaded by

jcata.send
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

ADO.NET Database Operations Guide

ADO.NET provides a framework for accessing and manipulating databases through operations such as connecting, selecting, and modifying data. It utilizes components like Connection, Command, DataReader, DataAdapter, DataTable, and DataRow to facilitate these tasks. The document outlines the steps for creating a connection, executing commands, and managing data within a database using ADO.NET.

Uploaded by

jcata.send
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ADO.

NET
Overview to [Link]

Operations when accessing databases:

- Connecting to a database
- Selecting records from tables
- Modifying data in tables
Overview to [Link]

Connection

Command

DataReader DataAdapter

DataTable

DataRow
TASKS
Looking up the database... Modifying the database...

Create and open the Connection to the Database

SQLiteConnection conn = new


SQLiteConnection("Data Source=" + DBpath +
";Version=3;")
[Link]();

Create a Command

SQLiteCommand comm = new SQLiteCommand(query,


conn);
Create a DataReader

SQLiteDataReader reader = [Link]();

Create a DataTable

DataTable dt = new DataTable();


[Link](reader);

Display the records of the foreach(DataRow dr in [Link])


DataTable {

}
Close the DataReader

Close the Connection to the Database


Create a DataAdapter, and
pass the Command to the
DataAdapter

SQLiteDataAdapter da = new SQLiteDataAdapter();

[Link] = comm;
[Link]();

[Link] = comm;
[Link]();

[Link] = comm;
[Link]();

Close the Connection to the Database

You might also like