Reputation: 21
My ASP.NET web application is not recognizing DataSet and DataAdapter. Which namespace is required to create a new DataSet?
Upvotes: 0
Views: 4917
Reputation: 997
just import system.data and imports system.data.oledb
in c# replace imports by using.
Upvotes: 1
Reputation: 53593
System.Data
For a typed DataSet, you can check the typed DataSet file's (.XSD file) .CS/.VB file; it will show the namespace.
Upvotes: 2
Reputation: 94645
DataSet class belongs to System.Data
namespace.
For provider classes use one of the following namespace,
System.Data.OleDB******, System.Data.SqlClient, **System.Data.Odbc, System.Data.OracleClient or vendor specific namespace.
Upvotes: 1
Reputation: 351506
Well, you are going to need to reference System.Data.dll
and here are the two types you are looking for with their fully-qualified names:
So add these using
statements at the top of your file:
using System.Data;
using System.Data.Common;
Upvotes: 2
Reputation: 52241
Namespace
using System.Data;
OR Directly
System.Data.DataSet ds = new System.Data.DataSet();
Upvotes: 6