Populating HashTable with a DataTable

rcaine

Member
Joined
Mar 9, 2005
Messages
6
Hi all,

Is there a way to bind a hastable to datatable inside a dataset? If not, what would be the best approach to get the data into it?

I would have thought looping through the datarows and adding value pairs to the hashtable would not be the most efficient method.

Thanks
 
rcaine said:
Hi all,

Is there a way to bind a hastable to datatable inside a dataset? If not, what would be the best approach to get the data into it?

I would have thought looping through the datarows and adding value pairs to the hashtable would not be the most efficient method.

Thanks
Are trying to associate a key value with a datatable row?

Like:
MyHash[Key1] = MyDataTable[1];
MyHash[Key2] = MyDataTable[2];
MyHash[Key3] = MyDataTable[3];

I would ask, what are Key1, Key2, Key3?
Where are they coming from? another Datatable? if so, get the table in the same dataset and build a relationship between the two.
 
Back
Top