Let me start by letting you know that I'm still new to VB.
All I know about Programing is with the use of google, Videos, and some good help from DaniWeb.
I'm doing a program which searches datagrid colums with some classes That I have wrote. I have 5 textbox to enter the text to search for and when text is entered it searches for that text .
My question is by having the textchange event reference the class to search for the text I'm woundering if the program will slow down because it it's constantly referencing the same class.
Hope this makes any sence.
Thanks in advance.

A textchange search can take a long time, but this doesn't have to be because you are using classes or the same class for that matter.

If your search is taking a while and it hapens after each keystroke, then you should either plan your search differently or replace the textchange event with a button.

By saying plan your search differently, I mean:
a) Don't connect to a remote server to get the data. Network latency can kill a search.
b) Search with the criteria ordered in your query so that it will have maximum efficiency (if you start eliminating 1 record at a time and your final criteria is eliminating a huge chunk of data, then you are doing it wrong)
c) Create the appropriate indexes.
d) Load your data in a datatable and search it locally. Read here for info on searching a datatable: http://msdn.microsoft.com/en-us/library/y06xa2h1(v=vs.80).aspx

Thanks adam for your yelp

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.