Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Oct 28, 1999

Filter the Recordset Object

Question:

Does using the recordset.filter variable slow down response time greatly? For example:

rsObj.filter = "sCat = 1"

I am using it to filter my recordset object so that I can fill specific drop-downs with data. But it seems to be very slow when used against a SQL Server database. However, it works fine with a local Access file.

Answer:

Yes. Instead of using the Filter method, try to modify the SQL statement of your recordset so that it brings back only the records you need. In your example, include a where clause of the type "WHERE sCat = 1". This will be much faster than trying to bring in all the records from your database to your ASP page and then having the ASP page's recordset variable filter the data.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date