locked
DBCommandWrapper reference problem RRS feed

  • Question

  • User-513790065 posted

    public partial class _Default : System.Web.UI.Page 
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);
            string sSql="select * from users where UserName='"+TextBox1.Text+"'and Password='"+TextBox2.Text+"'"; 
            DBCommandWrapper cmd = db.GetSqlStringCommandWrapper(sSql);
            db.ExecuteNonQuery();
        }
    }using System;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    //using Microsoft.Practices.EnterpriseLibrary.Data;
    using System.Data.Common;
    using Microsoft.Practices.EnterpriseLibrary.Data;
    using Microsoft.Practices.EnterpriseLibrary.Data;
    Whenever I run the following code:



    using System;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using Microsoft.Practices.EnterpriseLibrary.Data;
    using System.Data.Common;




    public partial class _Default : System.Web.UI.Page 

    {

        protected void Page_Load(object sender, EventArgs e)

        {

            Database db = DatabaseFactory.CreateDatabase();

               string sSql="select * from users where UserName='"+TextBox1.Text+"'and Password='"+TextBox2.Text+"'"; 

            DBCommandWrapper cmd = db.GetSqlStringCommandWrapper(sSql);


            db.ExecuteNonQuery();

        }

    }


    I get the following error:


    Error The type or namespace name 'DBCommandWrapper' could not be found (are you missing a using directive or an assembly reference?)

    How can I resolve this problem?


    Friday, May 7, 2010 12:55 PM

All replies

  • User-263151482 posted

    http://forums.asp.net/p/966617/1680908.aspx

    Friday, May 7, 2010 1:35 PM