Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataSet Issue: "member names cannot be the same as their enclosing.."

Status
Not open for further replies.

oldmanbernie

Programmer
Jan 18, 2007
9
0
0
US
I created a dataset for my DAL, and when I tried to build the project, I received an error message saying, "member names cannot be the same as their enclosing types." I've tried renaming the class and object, but it doesn't seem to work. I am wondering if any of you had experienced this error message, and if so, what did you do to fix the issue?
 
BLL:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FooResultTableAdapters;

[System.ComponentModel.DataObject]
public class FooResultBLL
{
private FooResultTableAdapter _FooResultAdapter = null;
protected FooResultTableAdapter Adapter
{
get
{
if (_FooResultAdapter == null)
_FooResultAdapter = new Foo_ResultTableAdapter();

return _FooResultAdapter;
}
}

[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
public FooResult.FooResultDataTable GetFooResult()
{
return Adapter.GetFooResult();

}
}

DAL:

The DAL is tied to a SQL Server DB where it is an inner join between two tables. The DAL has the standard Fill and GetData methods.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top