Solved

VB software:  old school new school

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Runtime 2010 Error 17 33
Tags from access to excel 3 32
Parse last 2 characters of text value if they are letters 7 17
SSRS troubles 4 21
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

864 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

23 Experts available now in Live!

Get 1:1 Help Now