[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB .NET: sharing datasets across multiple forms

Posted on 2004-10-13
1
Medium Priority
?
323 Views
Last Modified: 2011-10-03
I would like to create all the database connections on the parent forms onload event, and then be able to access all the datasets thus generated by all the children forms (or most of them anyway).

What is the most efficient and most elegant way of sharing datasets across multiple forms?
0
Comment
Question by:majnun
1 Comment
 
LVL 8

Accepted Solution

by:
bramsquad earned 2000 total points
ID: 12299395
across multiple forms, youll want to create the variables in a startup module.

if you are not familiar, all you need to do is create a module with a Sub Main() call, and goto Project -> Properties and then select Sub Main() as your startup object.

for a good procedure to follow concerning starting from a module, check out RonaldBiemans answer to this question.

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21146363.html

after you have that, simply declare the variable public at the top of the module.  

youll now have access to it from any form you create.

~b

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question