 |
| AndreaVB Forum : VB.Net : Add, Delete, Edit Data in SQL Server using OleDbConnection, OleDbDataAdapter |
|
|
|
supun24 Level: Trainee
 Registered: 28-11-2006 Posts: 2
|
Add, Delete, Edit Data in SQL Server using OleDbConnection, OleDbDataAdapter
Hello Friends..
I want to know how to Add, Edit, Delete datas in SQL Server 2005 using OleDbConnection, OleDbDataAdapter and datasets.
I am beginer to Visual Basic.net. Can you tel it in step by step
Regards,
Supun Lanka
____________________________
supun lanka
|
|
28-11-2006 at 08:03 PM |
|
|
Bharathi Level: Scholar
 Registered: 11-04-2005 Posts: 31
|
Re: Add, Delete, Edit Data in SQL Server using OleDbConnection, OleDbDataAdapter
Hi,
if you are using the SQL server 2005 as your back end, use SQL Server dtaa provider.
SQL Server data provider—This type of data provider is used to work specially with Microsoft SQL Server. A SQL Server data provider is recommended for working with a Microsoft SQL Server data source, since a SQL Server data provider allows fast access to a data source without going through an OLE DB or ODBC layer. The SQL Server data provider classes are present in the System.Data.SqlClient namespace.
Mechanism to Maintain Data.
ADO.NET allows us to work with the retrieved data, that is, add, modify, or delete data and update the database with the changes that we make. Using ADO.Net we can update data using two methods. One is, cached in datasets and two, data retrieved from a database directly through data commands. We will examine how to use both the methods.
1. Cached data Update method.
Let us examine the sequence of operations that occur in this method.
a. Data from the database is cached in a dataset and presented to a user through an application.
b. The user updates the data, that is, adds, deletes, or modifies the data through the application.
c. The dataset is updated with the changes that the user makes through the application.
d. The changes in the dataset are transferred to the database at the back end.
2. Performing Direct Data Updates.
Generally, datasets are used to work with the data source since they provide a disconnected access to the data. However, in some cases, we may need to access a data source directly through data commands.
Data commands are generally used in the following cases:
• To work with stored procedures that return a result set, which can be manipulated.
• To access data that is not appropriate for storing in a dataset, such as data with a short life cycle.
• To access read-only data, that is, data that will not be updated.
Database programming using Visual Basic 2005
|
|
21-06-2007 at 05:59 AM |
|
|
Jihadalariqi Level: Protégé
 Registered: 18-12-2007 Posts: 7
|
Re: Add, Delete, Edit Data in SQL Server using OleDbConnection, OleDbDataAdapter
quote: want to know how to Add, Edit, Delete datas in SQL Server 2005 using OleDbConnection, OleDbDataAdapter and datasets.
for SqlServer Database Use the NameSpace
imports system.data.SqlClient
____________________________
vbboy
|
|
18-01-2008 at 04:02 PM |
|
|
| AndreaVB Forum : VB.Net : Add, Delete, Edit Data in SQL Server using OleDbConnection, OleDbDataAdapter |
|
|
|
 |
 |