Hey.. =)

I am making a program and i need to use:

using System.Data.ADO

But it won't work?
Anybody know what i can do?

8 Years
Discussion Span
Last Post by pepsy11

ADO.NET includes two categories of classes.

1. Relational classes (DataSet) : These classes used independently of .net data provider (database classes) to manage data local to the application. Relational classes are found at the System.Data namespace.

2. Data-Provider classes : Data-Provider classes are for connecting database, executing queries (commands), and retrieving results.

If you are planing to programming with MS-SQL server database then choose System.Data.SqlClient namespace classes.

using System;
using System.Data;
using System.Data.SqlClient;

public class Sample {


I would change if i could, but i can't find out how to save new records. I have asked in this thread for some help to that:

But i have found an example of how to save new records to my database but i need to use data.ADO
This is the sample i am trying at the moment:

If you have any idea how i can save a new record then please, please tell me.. I really need it. =)


System.Data.ADO does not exist. The article you linked to was written in 2001 when .NET was still in beta. The final release and subsequent releases use objects in other namespaces.

As adatapost said, you should use objects within a namespace that is specific to your database connection type.

If you are using SQL Server, it would be System.Data.SqlClient, and you would look at objects such as SqlConnection, SqlCommand, SqlDataAdapter, etc.

If you are using an OLEDB database such as Microsoft Access, you would use System.Data.OleDb and objects such as OleDbConnection, OleDbCommand, and OleDbDataAdapter.

ODBC => System.Data.Odbc => OdbcConnection, OdbcCommand, OdbcDataAdapter, etc.

The objects inherit from common base classes (DbConnection, DbCommand, DbDataAdapter, etc.) and behave in the same way, but the implementation details are optimized for the given connection type. Do research on the family of objects that best meet the needs for your given database.


I am using an sql db.

Thanks for the answer.

You can try to help me in my other thread if you want. =)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.