473,396 Members | 2,011 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,396 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
Jul 19 '05 #1
1 1784
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

Jul 19 '05 #2

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...
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: 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");...
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.
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.