473,503 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataSet Collection From Componet Designer

Using vs2003, vb.net, msde...

I have Component Designer class that has many datasets in it. I would like
a way to iterate through the DataSets in an instantiation of the Component
Designer class, but don'see any collect available to do that.

' holds Dataset
Dim DS As DataSet

' instantiat component designer class

dim CD as new Component_Designer_Class

' will walk through all Data Sets in Component Designer class

For Each DS In CD.Collection ' *** no such collection command
exists

' code

Next

Any ideas?

Thanks Bob
Nov 20 '05 #1
2 987
Bob,
You will need to manually create such a collection to enable enumerating
over it.

You may be able to use Reflection, however I would lean toward manually
defining the collection, simply to avoid picking up all the other child
objects...

Hope this helps
Jay

"Bob Day" <Bo****@TouchTalk.net> wrote in message
news:e6**************@TK2MSFTNGP12.phx.gbl...
Using vs2003, vb.net, msde...

I have Component Designer class that has many datasets in it. I would like a way to iterate through the DataSets in an instantiation of the Component Designer class, but don'see any collect available to do that.

' holds Dataset
Dim DS As DataSet

' instantiat component designer class

dim CD as new Component_Designer_Class

' will walk through all Data Sets in Component Designer class

For Each DS In CD.Collection ' *** no such collection command
exists

' code

Next

Any ideas?

Thanks Bob

Nov 20 '05 #2
Hi Bob,

Thanks for using Microsoft MSDN Managed Newsgroup. My name is Peter, and I
will be assisting you on this issue.

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to build a dataset
collection in a class.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

Here is some code you may take a look.
Imports System.Data
Imports System.Collections
Module Module1
Public Class Component_Designer_Class
Public CS As New Collection
Public Sub New()
Dim i As Integer
For i = 1 To 10
Dim ds As New DataSet
ds.DataSetName = "dataset" + i.ToString
CS.Add(ds)
Next
End Sub
End Class
Sub Main()
Dim ds As DataSet
Dim CD As New Component_Designer_Class
For Each ds In CD.CS
Console.WriteLine(ds.DataSetName)
Next
End Sub
End Module

If you have any concern, please post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #3

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

Similar topics

1
1518
by: Ari | last post by:
Hi I hope some body can help me. I'm new with Visual Basic .net. I'm trying to fill a DataSet from to combo box but i do not how to do and i do not find any information that expalin to me how to...
0
1171
by: Tom Gao | last post by:
Hello, We are having a recurring problem of a typed dataset that we have in a form dissapearing from the VS designer and all bindings being lost. The dataset is defined in another component and...
0
1041
by: Tom Gao | last post by:
Hello, We are having a recurring problem of a typed dataset that we have in a form dissapearing from the VS designer and all bindings being lost. The dataset is defined in another component and...
8
2242
by: drg | last post by:
I have a DataSet with a DateTime field. I am using an EventRow r, to update it with values from a TextBox in a DataGrid. Suppose a DataGrid in edit mode had a field with value: 7/7/2005. Then the...
2
3156
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
4
2593
by: Dave Taylor | last post by:
I've been using the dataset designer in Visual Studio to create typed datasets for my application by dragging over tables from the Server Explorer and dropping them into the designer. The problem...
4
2492
by: Michael | last post by:
Dear all .. If I want to use develop a user control and declare a public property which the type is System.Windows.Forms.GridTableStylesCollection For example : Public Class LookAndView...
4
2084
by: Robert Bravery | last post by:
Hi all, I have now correctly set up my dataset and two grids, so that the parent navigates the child. THe thing is that the child table is actually a lookup type table. It lists billing types for...
5
3047
by: =?Utf-8?B?UlBhcmtlcg==?= | last post by:
I used the wizard to generate a typed dataset for my table and let it create my SPROCs. It created everything, and the GetData() method and the custom GetByUserName query works great, but when I...
0
7202
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
7086
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
7280
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
7330
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
6991
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
4672
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.