We have developed a large application in VB 6 for many offices, pretty much very custom app with a lot of Forms.
In many of the Forms we have to provide information, like County (one or two out of 100 of them), Work Codes (a couple out of over 200 of them) and some other information, usually just 2 columns of data: number and description.
In VB 6 I just kept a Global array (let’s say array CountyName) that I populated at the beginning of my app, and wherever I needed it in my code, I did:
If I have a County number 77, I just did:
CountyName(77) and that gave me the name of the County – Polk.
So I don’t have to go to my ORACLE database just to get this information.
I don’t know if that’s the best way to keep this information in VB.NET 2008
Would it be proper to keep it the same way, in a global array? (Arrays in VB.NET are 0 based, so some of my data would start with element 1011, leaving first 1010 elements empty ) I was also considering a separate Dataset just for these purposes.
Any suggestions are welcome.
Have fun.
---- Andy