Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

NULL Table Values Not Displaying

Posted on 2003-11-12
4
Medium Priority
?
196 Views
Last Modified: 2013-12-24
I am displaying data from a table in SQL Server 2000, where the null columns do not display. What I mean is say three columns are City State ZIP. While City may show NYC, and ZIP 02108, the other column has not a cell when it is NULL. The cell disappears on columns with no data in the row. So the next row state may have data and the outline of the cell and data are there. any ideas? I have used access before and the frame of cells for the table appear regardless of data being present or not.
0
Comment
Question by:timokeeffe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 31

Accepted Solution

by:
seanpowell earned 2000 total points
ID: 9735467
It depends on the situation, but cells may not appear if they are "entirely" blank, so you need to at least have the non-breaking space character in there ( )

As an example with code:

If IsNull(rs_main.Fields("State").Value) Then
    Response.Write("<td>&nbsp;</td>")
Else
    Response.Write("<td>" + rs_main.Fields("State").Value + "</td>")
End If

Or, simply include the &nbsp; in every cell. Depending on how you're justifying the text and spacing the cells, it may not impact your layout...

Response.Write("<td>&nbsp;" + rs_main.Fields("State").Value + "</td>")

That way, even if no value is returned, the cell won't be blank.

Thanks,
Sean
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9831605
Hi Tim,

Any luck so far?

Thanks,
seanpowell
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9897833
Just checking in on you :)
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question