navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

how to check if a field has a value in a recordset?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> how to check if a field has a value in a recordset?
Page: [1]
 
cswolf

 

Posts: 42
Joined: 11/9/2005
Status: offline

 
how to check if a field has a value in a recordset? - 4/24/2008 12:46:40   
Hi all,

I've got some code here on a web page that I did not write that connects to an MS Access DB, searches it, and then displays the results for you. It is an internal phone directory. A question has come up where we would like for any entry in the DB that does not have a value for the "Title" field to not be displayed in the results. I was thinking some sort of filter would be able to do this, but I am not exactly sure how. How can I check if there is a value for something in a recordset, then if there is a value have it display the information, and if not just move on to the next record? I am using classic ASP by the way.

I was thinking it would be something like this:

<% check if "Title" field has value in recordset. If it does, Then

Display information here (I have this code already)

Else

Go to next record

End If %>

How would I do that? Thanks!
rdouglass

 

Posts: 9137
From: Biddeford, ME USA
Status: offline

 
RE: how to check if a field has a value in a recordset? - 4/24/2008 13:23:03   
quote:

check if "Title" field has value in recordset. If it does, Then


If trim(rs("Title") & "") > "" Then

That should be close.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to cswolf)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> how to check if a field has a value in a recordset?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts