Solved

NULL Table Values Not Displaying

Posted on 2003-11-12
4
170 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
  • 3
4 Comments
 
LVL 31

Accepted Solution

by:
seanpowell earned 500 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to Import and export files in WordPress. 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 : Click on Too…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

708 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now