Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: SV: Response.Write


Message #1 by "SD-Studios" <info@s...> on Mon, 8 Apr 2002 16:16:07 +0200
Lets just use an IF-string...=)

Something like this:
<%
...
Do While Not objRS.EOF
If Not objRS("myfield") = "" Then
%>
objRS("myfield")
<%
objRS.MoveNext
Loop
...
%>

The ...-dots in this case stands for the rest of the code and should not be
inserted. Dont hesitate writing again if this doesnt help you out! =)
--
Martin Johansson,
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


-----Ursprungligt meddelande-----
Från: IT@g... [mailto:IT@g...]
Skickat: den 8 april 2002 15:15
Till: ASP Databases
Ämne: [asp_databases] Response.Write


Hi, I have just started out programming in ASP.

I have a table that can potentially contain many fields.

I want my ASP page to only display the information if there is some data
in there.

For example in my Access database there are about 20 fields that can be
used in my table.  But I only want it to display the results if the fields
contain a value.

Is there a function that will enable my asp template page to not
Response.Write if the field is empty?

Or maybe a function that will dynamically display all of the fields that
contain data listed within a table and ignore the fields with no data?

What I don't want is to have to hard code the headings of a table only for
it to be blank if there is no data in some of the fields.

I would be very grateful if someone out there could help.

Thanks in advance.


  Return to Index