locked
Enterprise Library for Net 2.0 January 2006 question RRS feed

  • Question

  • User609994474 posted
    I know this forum is for the earlier verison of Enterprise Library, but I don't know where there is a forum for the 2.0 version.

    Does anyone know where the forum is for Enterprise Libary for Net 2.0?

    Here's my question that I needed answers to.

    I'm looking code like this:

    public DataSet GetProductsInCategory(int Category)
    {
        Database db = DatabaseFactory.CreateDatabase();
        string sqlCommand = "GetProductsByCategory";
        DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);
        db.AddInParameter(dbCommand, "CategoryID", DbType.Int32, Category);
        // DataSet that will hold the returned results.
        DataSet productDataSet = null;
    }

    productDataSet = db.ExecuteDataSet(dbCommand);
    resultsDataGrid.SetDataBinding(productDataSet, "Table");

    This question is ... do I have to have a "using" statement at the top of the code? or do I need to add any references to the project in the solution explorer?

    I think I need to add a block of code in the app.config or web.config file (depending where I want to use the code in windows form or web forms environment).


    Wednesday, April 5, 2006 8:51 PM

All replies