Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15568

conversion of an data array to list

$
0
0
I currently have an SQL table with about 2000 items in them, it is regularly used for reference data within the programme. As such at the start of the programme i load the SQL database in to an array (2000,3). When i want to look up an item, i then loop through the array until i find the matching item. This works fine, but i suspect is inefficient and there are now better ways of doing this.

As such i am thinking of loading the SQL data into a List Of T. However I am unsure if you can search by an index on the list or if you just have to loop through it until you find the requisite record. ?

Also is list of T the most appropriate class.

Something says I should be loading the SQL data into a dataset and searching the dataset / datatable, but likewise unsure.

Can you please confirm the most appropriate way to go about this.

Viewing all articles
Browse latest Browse all 15568

Trending Articles