The type or namespace name 'Database' could not be found...
ASP.Net WebForm, C#, Visual Studio, SQL Server connection
My code is something like this...
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Data.SqlClient;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
private void PopulateList()
{
// initialize the Database object
Database DataStore = new Database();
SqlDataReader dataReader = null;
...
DataStore.RunProc("CODES_SELECT_ALL", out dataReader);
while (dataReader.Read())
{ ...
}
}
C:\Inetpub\wwwroot\WebApplication1\...): The type or namespace name 'Database' could not be found (are you missing a using directive or an assembly reference?)
Any ideas for this rookie?
Ramesh NaiduPosted Oct 7, 2010, 6:11 AM
Inorder to use Database class, we need few dll's from microsoft enterprise library.
* Microsoft.Practices.EnterpriseLibrary.Common.dll
* Microsoft.Practices.EnterpriseLibrary.Data.dll
* Microsoft.Practices.ObjectBuilder2.dll
Add the reference of these libraries to your project and you will be able to get rid of the error.
Happy Learning :)
spacegazer11Posted Feb 12, 2004, 12:08 PM
gjghkhjPosted Jan 29, 2004, 6:40 AM