473,738 Members | 6,332 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1787
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
2152
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="<% Response.Write (rsUser("Name")) %>"> <% Response.Write (rsUser("Name")) %> <input type="hidden" name="Email" value="<% Response.Write (rsUser("Email")) %>">
4
1719
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
6208
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 done? regards, Oscar
7
2712
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? (May also substitute UPDATE and/or DELETE queries for DAO code.) I was just brought on to a project with Access 97 where the all data is kept on the server. It doubles in size each day, from 80 mb to 160 mb. The data file contains only tables...
2
3067
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 create work schedules for workers in a metal work shop, based on the tasks required to make a part and the tasks required to make the subcomponents of the part.
3
3185
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 wrapping a COM object because I am having issues with the types that C# does not seem to understand. I need to be able to use a method from the VB 6.0 dll which will query a proprietary data structure. I then need to return this and iterate...
2
1698
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 related. I want to query another table based on Com+ object recordset. Select distinct WebClas1 from IV00108wc where ItemNmbr in (...).
0
1066
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 as recSet2...I'm assuming this is relatively simple and my syntax just is incorrect or perhaps the way I'm opening my connections allows for a read only connection? Any help would be much appreciated. Thanks.
4
2716
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 code that calculates the total price, depending on number of units, currently what the code does is set the price like so - if qty 1 then £99+VAT if qty equall to or greater than 2 and equall to or less than 9 then price =
0
8968
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9473
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9259
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.