Solved

public shared classes

Posted on 2008-10-13
1
174 Views
Last Modified: 2012-05-05
dGreetings,

My program manages exam questions.  Each question is assigned to a Bank.  The Bank database table contains the Bank names, passwords, which Banks are currently opened, etc.  In VB6 I had a class that tracked Bank data that was instantiated in the Startup form.  Anytime  a form (or other class) needed to read the Bank information,  I created a Bank Class and used a Set to assign the class to the one that was instantiated in the Startup form.  This way all parts of the program could read current bank information without having to read the database.  

Is there a better way in Visual Net?  Using Public Shared procedures in my Bank class does not allow me to use Structures that are defined in the Bank Class.  

I guess I could move all the information to the Database, it just seems that there should be a way to reduce the amount of time spent reading the Bank Table.

Thanks




0
Comment
Question by:vaughnwhitehead
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 350 total points
ID: 22708454
You should be able to access Shared members of your class from Shared method.  You should be able to use a data layer that is shared no problem as long as you properly account for multiple threads writing to data; however, sounds like you have multiple read situation.

Regards,
Kevin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 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