473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Another recordset question

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
Jul 19 '05 #1
2 1765
Rob Meade wrote:
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..

Can't answer this without testing ...

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?


RS.Delete
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
"Bob Barrows" wrote ...
Can't answer this without testing ...
Hi Bob

No worries, I *personally* think that the If..then would be better,
otherwise I have to iterate through the entire recordset again - admittedly
only the once - but it could be huge, the If...Then is already in the main
iteration - so would make more sense....will probably go with this method
for now...
RS.Delete


doh! "Does exactly what it says on the tin" ... :o)

Cheers

Rob
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: C White | last post by:
I've got another drop list problem I am using the following code where users select a name, but it should pass a name and email into the table <select name="user"> <option value="<%...
4
by: cwhite | last post by:
Hi I have another drop list question. I have a table like this: computer dell computer ibm computer hp
27
by: Oscar | last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in an ASP page to another HTML-page. Is there someone who can provide me with a small sample or a link to see how this is...
7
by: Danny J. Lesandrini | last post by:
I know this has been discussed before, as I've seen the Google posts, but they all leave me with an unanswered question: Does my DAO code executed in the front end cause the back end to bloat?...
2
by: Colm O'Hagan | last post by:
Hi there, I having a problem with a database I'm setting up, I would be delighted if someone out there could help. The database I'm setting up is a task register datebase, it will be used to...
3
by: Andrew Mueller | last post by:
Hello, I tried this question prior and got no response, so thought I would try to explain differently.. I am not sure which type of object to pass between a VB 6.0 ActiveX dll and C#. I am...
2
by: Sreedhar Vankayala | last post by:
Hi, I have a table IV00108wc which contains several thousand records in whcih ITEMNMBR is the primary key. I have a com+ object returning recordset which has ITEMNMBR and another details...
0
by: Kosmos | last post by:
Okay so the following is a question I posted earlier...to clarify what I'm trying to do here...I simply want the printed output to be put into a new field in a different table that's already created...
4
by: =?Utf-8?B?R1ROMTcwNzc3?= | last post by:
Hi Guys, thanks for your help yesterday, I've got one more question, then I think I'm done for now,... Is it possible to insert recordset data in a javascript, for instance I have a javascript...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.