473,382 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Is DataSet belong another namespace

ad
I use a Webservice, which retun a DataSet.
I use the code:
DataSet ds = (DataSet)wsHealth.GetSchools(Text1.Text);

But it result in an error in run time, the error message is
Unable to cast object of type 'System.Data.DataSet' to type 'DataSet'.
The namespaces I used are
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;

Is there an namespace rather than System.Data which also contail DataSet?
Nov 17 '05 #1
2 3913
You must have written some class called "DataSet" that is taking precedence.
Look at your own code and see what it contains. Maybe you could find it by
doing something like right-clicking on the DataSet name that is the return
type for GetSchools and select "Go To Definition".

"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I use a Webservice, which retun a DataSet.
I use the code:
DataSet ds = (DataSet)wsHealth.GetSchools(Text1.Text);

But it result in an error in run time, the error message is
Unable to cast object of type 'System.Data.DataSet' to type 'DataSet'.
The namespaces I used are
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;

Is there an namespace rather than System.Data which also contail DataSet?

Nov 17 '05 #2
ad
Thanks

I can't find any user defined Calss called "DataSet" in my solution.
When I right-clicking on the DataSet name that is the return
type for GetSchools and select "Go To Definition", it bring me to the
definition of DataSet in System.Data.


"Peter Rilling" <pe***@nospam.rilling.net> ¼¶¼g©ó¶l¥ó·s»D:Oh******************@TK2MSFTNGP09.p hx.gbl...
You must have written some class called "DataSet" that is taking
precedence. Look at your own code and see what it contains. Maybe you
could find it by doing something like right-clicking on the DataSet name
that is the return type for GetSchools and select "Go To Definition".

"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I use a Webservice, which retun a DataSet.
I use the code:
DataSet ds = (DataSet)wsHealth.GetSchools(Text1.Text);

But it result in an error in run time, the error message is
Unable to cast object of type 'System.Data.DataSet' to type 'DataSet'.
The namespaces I used are
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;

Is there an namespace rather than System.Data which also contail DataSet?


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
1
by: Wil | last post by:
I'm very new to developing in .NET and even newer to XML. The past few days have been pretty frustrating for me because I'm trying to perform a transform on data in a dataset and it's not working....
6
by: Nikhil Patel | last post by:
Hi all, Following is a portion of an XML document. I need to remove all nodes that belong to ns0 without deleting their child nodes. So in the following example , I want to delete "ns0:Proposal"...
3
by: news.microsoft.com | last post by:
The question is, is a DataSet CLS compliant? Minimally implemented code, with an attribute in the assemblyinfo.cs compiles just fine (is it possibly the data INSIDE the dataset that could...
1
by: Yosh | last post by:
Let's say I have a DataRow that I got from DataSet "A". Can I modify the data in the DataRow and add it to a new DataSet "B" and have it update the same datasource? I hope this makes sense. ...
9
by: Dave | last post by:
Compilier will not recognize DataSet object. As you can see below is from a test simple form with no other code. I'm just trying to get any Aspx form to recognize the DataSet object. You can...
12
by: Whoever | last post by:
Hi, I'm trying to return an XmlDocument or XmlNode converted from a typed dataset. public XmlNode whatever() { MyTypedDataSet ds = new MyTypedDataSet(); return new XmlDataDocument(ds); }
9
by: Mr Newbie | last post by:
HI People, Thanks to all who helped me earlier on the subject of @@IDentity. However, I seem to have hit another snagette! My DataSet contains two tables from the SQL Server. lets say Master...
0
by: langthanh | last post by:
hi i have two datasets , one will return all employees belong to supervisor, and the other one will select all the documents belong to the temployees and write it to the files that have the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.