How to access a common dataset from multiple window forms?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I access oleDbConnections, oleDbDataAdapters, and data sets that are one one windows form, from another windows form

Basically what I've done is add a new item of a data set to a project, drag a database from the server explorer, and define the relationships. I now want to access, populate, and manipulate this common data set from multiple window forms. I'm new to .net, so I am not sure if this is a wise approach, and if it is what is a good way to do this. Would appreciate any suggestions

Thanks!!
 
Hi Micheal,

You might drag a dataset from toolbox and set its type when prompted.
However in this way you'll end with several instances.
The other way (to share the same instance) is through code only - no
designtime support.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Michael said:
How do I access oleDbConnections, oleDbDataAdapters, and data sets that
are one one windows form, from another windows form?
Basically what I've done is add a new item of a data set to a project,
drag a database from the server explorer, and define the relationships. I
now want to access, populate, and manipulate this common data set from
multiple window forms. I'm new to .net, so I am not sure if this is a wise
approach, and if it is what is a good way to do this. Would appreciate any
suggestions.
 
how about pass dataset in the forms, when you create them


Michael said:
How do I access oleDbConnections, oleDbDataAdapters, and data sets that
are one one windows form, from another windows form?
Basically what I've done is add a new item of a data set to a project,
drag a database from the server explorer, and define the relationships. I
now want to access, populate, and manipulate this common data set from
multiple window forms. I'm new to .net, so I am not sure if this is a wise
approach, and if it is what is a good way to do this. Would appreciate any
suggestions.
 
Back
Top