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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error with DataViews

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi guys,

I'm coming out with this error when I try to use a dataview in my Webservice:

"You must implement the Add(System.Data.DataRowView) method on System.Data.DataView because it inherits from ICollection."

Now I've seen examples done using DataView and they never use DataRowView.

Here are some of my lines of code:

GetDetails = Users.Tables["users"].DefaultView;
GetDetails.AllowEdit = true;
GetDetails.RowFilter = "username = " + name + "";
return GetDetails;


Any help on this would be much appreciated.

J.
 
Hi if anyone could help with this it would be much apprecitated. The error seems to only occur when I am returning a DataView from the WebService. That just doesn't seem to make sense to me. I can do the operations above fine but if I try and return the dataview I created I get the above error. If someone can help me out with this plz do, alot of my problems would be solved.

cheers,
J.
 
Just a guess... do you have to serialize it? It's returning a DataSet, but you might have to return a string (xml) representation of the DataSet.

Again, I'm not sure, but if you've seen examples that do that and the only difference is that you're doing this in a web service...

 
Just a guess... do you have to serialize it? It's returning a DataSet, but you might have to return a string (xml) representation of the DataSet.

Again, I'm not sure, but if you've seen examples that do that and the only difference is that you're doing this in a web service...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top