By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,344 Members | 1,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,344 IT Pros & Developers. It's quick & easy.

Indexing a datatable column

P: n/a
Hey All!

I would like to create a index to a column in my datatable (full created in
memory). That's because I'll search that column a lot, and this manner I
want to improve the search speedy on that.

How can I create that index?

Ps: I can't use the PrimaryKey property to this case, because that columns
can have duplicate values.
[]s
Cesar


Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Ronchese,
By implementing the hashtable in this you are already there, however can you
show us which search method you did use. There are four to use, did you try
them all?

Cor
Nov 21 '05 #2

P: n/a
Cor,

I'm using the .Select() method of the Datatable, to find the row.

"Cor Ligthert [MVP]" <no************@planet.nl> escreveu na mensagem
news:eE**************@tk2msftngp13.phx.gbl...
Ronchese,
By implementing the hashtable in this you are already there, however can you
show us which search method you did use. There are four to use, did you try
them all?

Cor

Nov 21 '05 #3

P: n/a
Ronchese,

I'm using the .Select() method of the Datatable, to find the row.


The slowest one :-)

Have a look at
Dataview.rowfilter

http://msdn.microsoft.com/library/de...iltertopic.asp

Datarowcollection.find

http://msdn.microsoft.com/library/de...sfindtopic.asp

Dataview.find
http://msdn.microsoft.com/library/de...sfindtopic.asp

I hope this helps,

Cor
Nov 21 '05 #4

P: n/a
Cor,

once the DataView is sorted by a column, is true that it will perform some
quick algoritm to find data in that column? If yes, is what I'm searching.

Cesar

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:uY**************@TK2MSFTNGP10.phx.gbl...
Ronchese,

I'm using the .Select() method of the Datatable, to find the row.


The slowest one :-)

Have a look at
Dataview.rowfilter

http://msdn.microsoft.com/library/de...iltertopic.asp

Datarowcollection.find

http://msdn.microsoft.com/library/de...sfindtopic.asp

Dataview.find
http://msdn.microsoft.com/library/de...sfindtopic.asp

I hope this helps,

Cor

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.