Solved

NULL Table Values Not Displaying

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to gather data from news site 6 52
Magento as industry internet resource portal? 6 47
Best code editor tool for PC 4 132
Text Transformation using ActionScript 3 5 176
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…
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 create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

749 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