473,471 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

creating dataset from datarowcollection

I have a datarow collection (drAccountInfo), and I want to add each row to a
datatable that is then added to a dataset...here is my code:

Dim iCount As Integer
Dim myDataTable As New DataTable

For iCount = 0 to drAccountInfo.Length-1
Trace.Warn(iCount)
myDataTable.ImportRow(drAccountInfo(iCount))
Next iCount

Dim myDataSet As New DataSet
myDataSet.Tables.Add(myDataTable)
myDataSet.WriteXML("C:\inetpub\wwwroot\myapp\myfil e.xml")

Everytime I run it, I get a blank dataset, but I know there is data in the
datarow collection. What gives?
Nov 18 '05 #1
0 950

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

Similar topics

2
by: Miro | last post by:
Hi All, Just wanna check if there is a way to locate/search within a dataset without using the select/filter method. Increasing the accracy of the SQL command has not enabled a smaller dataset....
4
by: Steve Donnor | last post by:
Here's my question.. I have a Dataset which has populated a datagrid with information from an AS400 That SQL looks like this "Select MASYS, MAFLD, MADATA, MAEQV from QS36F.MAPDATA WHERE MASYS =...
4
by: Frnak McKenney | last post by:
I'm using an in-core DataSet as an image of my application's 'database' (a multi-table Access97 mdb file). Updates are made to the DataTables within the DataSet via forms with bound TextBoxes,...
5
by: web1110 | last post by:
I have a SQL table that has a bunch of data in it. For a particular execution, some subset of that data is is relevant and is downloaded into a DataSet table. Now, all the information is...
1
by: Shapper | last post by:
Hello, I am trying to create a dataset by adding rows to it in a For loop: Dim dsNews As DataSet = New DataSet() Dim row As DataRow = dsNews.Tables(0).NewRow() dsNews.Tables.Add...
9
by: Miky | last post by:
I have the following problem: I am populating a dataset but, sometimes (NOT always), the NewRow method works like the Add method. SetRightDetail.RightDetail.Rows.Clear() For Each Right In...
2
by: Brett Romero | last post by:
I use a method that returns either a dataset or a collection depending on the method called. Since no database is involved at the layer I'm working, I can't use a data adapter's fill method to...
4
by: LW | last post by:
Hi! I have a DataSet and a class in my Web Service. My output for example is: <OrderInfo> <CustomerID>VINET</CustomerID> <OrderID>10248</OrderID> <OrderDate>07/07/1996</OrderDate>...
3
by: Carlos | last post by:
Hi all, I have 2 asp .net 2.0 projects currently being developed. One is in VB .Net and the other in C#. In the VB .Net project I can cross-reference a datatable object using the...
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...
1
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.