Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Hello Techies. I have a ASP 101 question. I need to know

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
Home » Discuss » DU Groups » Computers & Internet » Website, DB, & Software Developers Group Donate to DU
 
Kahuna Donating Member (1000+ posts) Send PM | Profile | Ignore Fri Jan-29-10 09:44 PM
Original message
Hello Techies. I have a ASP 101 question. I need to know
how to suppress a row with no data.

I have 19 rows as follows for ingredients 1 through 19.

<% IF RS( "Ingredient9" ) <> "?????" THEN %>
<%=RS( "Ingredient9" )%>
<% END IF %>

How do I suppress rows with "?????" so that if Ingredient5 through ingredient19 have "?????", empty row spaces are not created? Or, a big gap is not created after row Ingredient5 and the next line of code that would come after Ingredient19?

I know this is really simple, but I just picked up ASP less than a month ago, and I need a solution to this problem, as soon as possible. So, if any of you techies will send me a PM with the solution, I'd really appreciate it.
Refresh | 0 Recommendations Printer Friendly | Permalink | Reply | Top
paparush Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Apr-01-10 12:18 PM
Response to Original message
1. Lets back up a step - Should your query be returning empty rows?
Printer Friendly | Permalink | Reply | Top
 
bergie321 Donating Member (797 posts) Send PM | Profile | Ignore Thu Apr-01-10 01:51 PM
Response to Original message
2. If you are locked into the data structure
you could use the VB ternary function IIf(expression,trueResponse,falseResponse)

ex:
IIf(RS( "Ingredient9" ) = "?????", "", RS( "Ingredient9" ))

That will return an empty string if Ingredient9 is "?????" otherwise it will return the value of Ingredient9.

Best solution is to rewrite the data structure and have the ingredients in a separate Many to One table that links to the table that currently has columns for Ingredient1-19.
Printer Friendly | Permalink | Reply | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Thu May 02nd 2024, 04:37 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » DU Groups » Computers & Internet » Website, DB, & Software Developers Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC