sirpelidor
08-03-2005, 11:18 AM
Hi, there's a "search" function at my asp web application. Because the function only searching ID (integer), the users require the search function has to be active at all time (meaning: if the ID is "1234", as soon as the user enter 1, it will display anything began with 1, when user type 12 it will display anything began with 12, so on .... until "1234")
I was able to got around that by mixing javascript + asp + ado combine with SQL call. Basically just have javascript listen when key is pressed, it then made asp kept sending sql statment with the LIKE clause (and i limit the display down to 15 records) to SQL server in order to display result in real time.
As you see, this is extremely draining performance, the connection between ASP and SQL server has to be always on while user is hitting button. They sure can't tell the different when doing data entry, but when I have more people doing Data Entry at the same time, the problem become obvious.
I'm looking for ways to accomplish the simpler result without putting so much stress on the connection to sql server.
Here's the thoughts I have, but not sure how exactly to implement it:
1) use Getrow to dump the recordset into a array, and have user search the array, but looping through a array is very slow
2) setup some kindda data structure, such as harshtable, or maybe binary-tree, and copy a recordset to that local linked-list. I think that probably the best idea, but i doubt scripting language such as ASP would support data-structure programming
3) .... re-write the whole application in asp.net and just use DataSet object off ado.net (well, that sure will require quite some development time)
4) come seek for advise from www.webdevelopers.com *wink*
Thank you for your time
I was able to got around that by mixing javascript + asp + ado combine with SQL call. Basically just have javascript listen when key is pressed, it then made asp kept sending sql statment with the LIKE clause (and i limit the display down to 15 records) to SQL server in order to display result in real time.
As you see, this is extremely draining performance, the connection between ASP and SQL server has to be always on while user is hitting button. They sure can't tell the different when doing data entry, but when I have more people doing Data Entry at the same time, the problem become obvious.
I'm looking for ways to accomplish the simpler result without putting so much stress on the connection to sql server.
Here's the thoughts I have, but not sure how exactly to implement it:
1) use Getrow to dump the recordset into a array, and have user search the array, but looping through a array is very slow
2) setup some kindda data structure, such as harshtable, or maybe binary-tree, and copy a recordset to that local linked-list. I think that probably the best idea, but i doubt scripting language such as ASP would support data-structure programming
3) .... re-write the whole application in asp.net and just use DataSet object off ado.net (well, that sure will require quite some development time)
4) come seek for advise from www.webdevelopers.com *wink*
Thank you for your time