R
Rob Meade
Lo all,
I have a local recordset which is not linked to a database.
Some of the fields in this recordset contain html tags.
I have a function which is called when I'm calculating my relevance for
search results which gets the row from the recordset, strips out the html
tags, then does its magic to produce the 'relevance' for that row.
My problem is that when the search is carried out initially, it obviously
matches against the html aswell, after my relevance is calculated a row
could exist in my recordset with a 0 for relevance but its still in the
recordset because it was found initially.
I figure I have two options - before I dump the results to the page I could
either iterate through the recordset again, if there are any results with a
0 relevance then delete them from the recordset, or, have an if..then to see
if the relevance for that row is 0 and then NOT display it to the page.
Question :
Is it better to remove the row from the recordset then just display all -
rather than using the if...then or is it better to use the if...then and not
have to iterate through the recordset to remove all the 0 relevance rows..
Also - if I am to delete the rows from the recordset - anyone got a small
snippet of code to do that?
I'm using stuff like :
RS.AddNew
RS.Update
for this local recordset - not sure how to drop a row like this?
Any help is appreciated,
Regards
Rob
I have a local recordset which is not linked to a database.
Some of the fields in this recordset contain html tags.
I have a function which is called when I'm calculating my relevance for
search results which gets the row from the recordset, strips out the html
tags, then does its magic to produce the 'relevance' for that row.
My problem is that when the search is carried out initially, it obviously
matches against the html aswell, after my relevance is calculated a row
could exist in my recordset with a 0 for relevance but its still in the
recordset because it was found initially.
I figure I have two options - before I dump the results to the page I could
either iterate through the recordset again, if there are any results with a
0 relevance then delete them from the recordset, or, have an if..then to see
if the relevance for that row is 0 and then NOT display it to the page.
Question :
Is it better to remove the row from the recordset then just display all -
rather than using the if...then or is it better to use the if...then and not
have to iterate through the recordset to remove all the 0 relevance rows..
Also - if I am to delete the rows from the recordset - anyone got a small
snippet of code to do that?
I'm using stuff like :
RS.AddNew
RS.Update
for this local recordset - not sure how to drop a row like this?
Any help is appreciated,
Regards
Rob