473,395 Members | 1,692 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,395 software developers and data experts.

Get DataSet's table with TypeDescriptor

Hi, I want to get a table from a DataSet using TypeDescriptor. Why doesn't
this work? What would be the correct way of doing it?

DataSet ds = new DataSet();
ds.Tables.Add("Table1");
PropertyDescriptor Prop = TypeDescriptor.GetProperties(ds)["Table1"];
// Prop is null

Thanks!

Etienne
Nov 15 '05 #1
1 2659
Well... "Table1" is not a property of DataSet class - its just an element in
DataSet's Tables collection.

"Etienne Charland" <my*****@golden.net> wrote in message
news:SJ**********************@mantis.golden.net...
Hi, I want to get a table from a DataSet using TypeDescriptor. Why doesn't
this work? What would be the correct way of doing it?

DataSet ds = new DataSet();
ds.Tables.Add("Table1");
PropertyDescriptor Prop = TypeDescriptor.GetProperties(ds)["Table1"];
// Prop is null

Thanks!

Etienne

Nov 15 '05 #2

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

Similar topics

1
by: Etienne Charland | last post by:
Hi, I want to get a table from a DataSet using TypeDescriptor. Why doesn't this work? What would be the correct way of doing it? DataSet ds = new DataSet(); ds.Tables.Add("Table1");...
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...
3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
1
by: Ralf Hoeppner | last post by:
I have a form which contains a property of type System.Data.DataSet. I assign a DataSet to this property at design-time the forms designer. When I now check the dataSet property in the property...
15
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
16
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill...
0
by: vishy | last post by:
Hi, we can access a record in dataset by column name,or by index..but when we implement collections using collectionbase we can do so by only index..how can I add the feature of accessing using...
2
by: Robert Ludig | last post by:
I have class that has a property wich has a custom typeconverter: class A { private string _property; public string Property { get { return _property; } }
7
by: Andrus | last post by:
var db = new MyDb(connString); causes creation of all objects corresponding to all tables in database. Database contains 500 tables. Application accesses only few tables at a time. Creating...
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: 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
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.