473,395 Members | 1,558 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.

datatable to dataset

Tom
I have a dataTable being returned from my datalayet, I need to convert it to
a dataSet so I can do some data manipulation to it prior to populating my
datagrid. How can I convert the datatable to a dataset?
Jul 17 '06 #1
3 1959
I do not know why you have to "convert" a datatable to dataset in order to
your data manipulating and databinding, chances are that you may not have
to.

Regardless, you cannot CONVERT DataTable to DataSet. DataSet is a container
that can contain 0 or more DataTable. If you have to place a DataTable into
a DataSet, you can

DataSet ds=new DataSet();
ds.Tables.Add(myDataTable);

"Tom" <To*@discussions.microsoft.comwrote in message
news:85**********************************@microsof t.com...
>I have a dataTable being returned from my datalayet, I need to convert it
to
a dataSet so I can do some data manipulation to it prior to populating my
datagrid. How can I convert the datatable to a dataset?


Jul 17 '06 #2
Tom
Im' grouping by data in my grid, and I've tried to do that using a dataTable
and no luck. I already have a web Form that has a grid that the data is
grouped/

"Norman Yuan" wrote:
I do not know why you have to "convert" a datatable to dataset in order to
your data manipulating and databinding, chances are that you may not have
to.

Regardless, you cannot CONVERT DataTable to DataSet. DataSet is a container
that can contain 0 or more DataTable. If you have to place a DataTable into
a DataSet, you can

DataSet ds=new DataSet();
ds.Tables.Add(myDataTable);

"Tom" <To*@discussions.microsoft.comwrote in message
news:85**********************************@microsof t.com...
I have a dataTable being returned from my datalayet, I need to convert it
to
a dataSet so I can do some data manipulation to it prior to populating my
datagrid. How can I convert the datatable to a dataset?


Jul 17 '06 #3
Well, using a dataset isn't going to help you solve your problem, even
though it is not at all clear what the problem is.

Norman explained the different between a datatable and a dataset, and the
the former is fundamentally a collection of the latter.

Maybe you should tell us what the problem is, clearly, and precisely,
providing relevant code if necessary.

"Tom" <To*@discussions.microsoft.comwrote in message
news:36**********************************@microsof t.com...
Im' grouping by data in my grid, and I've tried to do that using a
dataTable
and no luck. I already have a web Form that has a grid that the data is
grouped/

"Norman Yuan" wrote:
>I do not know why you have to "convert" a datatable to dataset in order
to
your data manipulating and databinding, chances are that you may not have
to.

Regardless, you cannot CONVERT DataTable to DataSet. DataSet is a
container
that can contain 0 or more DataTable. If you have to place a DataTable
into
a DataSet, you can

DataSet ds=new DataSet();
ds.Tables.Add(myDataTable);

"Tom" <To*@discussions.microsoft.comwrote in message
news:85**********************************@microso ft.com...
>I have a dataTable being returned from my datalayet, I need to convert
it
to
a dataSet so I can do some data manipulation to it prior to populating
my
datagrid. How can I convert the datatable to a dataset?




Jul 17 '06 #4

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

Similar topics

0
by: Chris Ericoli | last post by:
Hi, I am working with an 'in session' ado dataset with an asp.net application. My dataset is comprised of two tables, one of which maintains a few calculated datacolumns. For some reason these...
1
by: cindy | last post by:
Get data into datatable, add to dataset dsSearch " Get data into datatable, add to dataset dsSearch Using In-Memory SQL Engine join the tables and select the filenames from the join, add to...
3
by: Jon | last post by:
I'm learning about datatables. When using the example provided by MS in the ..NET Framework Class Library for DATATABLE (see below) I get an error on line 3 that says "Type expected". Is something...
3
by: Datatable Dataset Datagrid help | last post by:
Hi I am somewhat confused, I am new at VB.net I use XML data, I have a datagrid, I created a datatable so that I can create a custom format like true is this graphic false is this graphic and...
10
by: dauphian | last post by:
Hello, I am new to .net and am trying to build a report application that queries 4 different tables based on a id, and I need to return them in the same table for easy viewing. Basically, I...
6
by: Nick | last post by:
I have a code that returns data in IList. My webGrid doesn't allow me to sort with IList returned, it say it only suports DataView, DataTable and DataSet, not IEnumerable. I don't know how to...
9
by: jsoques | last post by:
Hello, I created a Web Service using .Net 2.0 that has a function that returns a DataTable. I can test the function from the web page when I access the .asmx from a browser on localhost and it...
0
by: Maart_newbie | last post by:
Hi all, I've got a question about returning the value of a pk-column to a DataTable after inserting a row (via a data-adapter) using MySql5. Here is the SQL and code concerned: ...
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
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...
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
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
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.