Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB software:  old school new school

Posted on 2013-11-13
2
Medium Priority
?
263 Views
Last Modified: 2013-11-14
A number of years ago I used collections .add  . remove  .count to keep track of data.

My understanding is that collections are old school, what is the new way of inputting large amounts of data (objects)  and keeping track of each item, either adding, updating, or deleting items?
0
Comment
Question by:brianpowell
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 750 total points
ID: 39646623
I would not say collections are "old school". They're still very useful objects in your programming arsenal, but .NET certainly has moved the marker forward in that area. Many use the List class, which allows you to store a "list" of objects. It's used like this:

Dim obj as List (Of String)

The "Of String" could be anything, like "Of clsInvoice", if I needed a list of my "clsInvoice" objects. It's fairly simple to use a List:

Dim Customers As List(Of String)

Customers.Add("Bob")
Customers.Add("Sue")
Customers.Add("Sam")

Here's the MSDN page that defines all the Properties, Methods, etc of the List:

http://msdn.microsoft.com/en-us/library/6sh2ey19(v=vs.110).aspx
0
 
LVL 10

Assisted Solution

by:joriszwaenepoel
joriszwaenepoel earned 750 total points
ID: 39647239
It depends on the scenario, sometimes a classic collection is still a good choice. But in a lot of cases there is a better alternative in the Generic collections:

http://msdn.microsoft.com/en-us/library/ms172192(v=vs.110).aspx

For example there is:
- List
- Queue
- Stack
- Dictionary
- SortedList
- SortedDictionary
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 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