Solved

VB .NET: sharing datasets across multiple forms

Posted on 2004-10-13
1
282 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 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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 …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now