Solved

NULL Table Values Not Displaying

Posted on 2003-11-12
4
176 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Advice needed on CMS/coding platform 9 59
Need Java help: System.out.println, System.out.print and System.out.format 19 150
About Wordpress website 3 107
Blue Coat API portal URL 2 164
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
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 set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

810 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