472,353 Members | 1,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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 950
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
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...
0
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...
0
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...
8
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...
2
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....
4
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...
4
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...
4
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...
5
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...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.