Solved

VB software:  old school new school

Posted on 2013-11-13
2
228 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 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 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 250 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

16 Experts available now in Live!

Get 1:1 Help Now