|
Preforming a binary(SQL) search on a datagrid.
Hey, all. I have another problem that we're running into with our project.
We use data grids to handle the viewing of the main tables in our program, those tables being Employees, Invoices(Masters + Items), and Purchase Orders(Masters + items), and we're setting up a search function for them. We have one working. The only problem is that it's a serial search, running through the whole data grid to find what it's looking for. That's fine for small tables, but in a search like that, it becomes impractical when there are thousands of records like there would potentially be in an A/P system. There would be tremendous system slowdown, and I'm sure I'm not the only one who sees it as bad practice.
So, I'm wanting to preform a binary search, and I talked it over with my teacher. He said that I need to find a way to move the record pointer in the data grid without refreshing the data in the data grid, as the only thing I can think that's close to a binary search is preforming select queries based on the search parameters and eliminating all irrelevant data. I don't know if that's called anything different, but it's really the only way I know, and my teacher shot that down.
I guess what I'm asking is, is there any way to change the record pointer location of a data grid based on a SQL Select query, or is there a special SQL function for binary searches?
Any help is much appreciated.
Thanks. =]
__________________
Tier 2 Hardware Technician
Net Effects, LLC
Brunswick, Ohio
|