473,385 Members | 1,817 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,385 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 1782
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.