473,385 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Show if DB field NOT NULL

What is the correct code to use to hide a section if a specific DB field is
NULL.

Thanks
Jul 19 '05 #1
7 25050
"Keith" wrote:
What is the correct code to use to hide a section if a specific DB
field is NULL.


Define "hide a section".
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #2
On Fri, 9 Jul 2004 23:39:15 +0100, "Keith" <@.> wrote:
What is the correct code to use to hide a section if a specific DB field is
NULL.


Hide a section as in using DHTML to hide/unhide? Try a DHTML group
for that answer.

If you're looking for an ASP-only answer:

IF DBField <> Null Then
Response.Write "Hidden Section"
End If

Jeff
Jul 19 '05 #3
Sorry - badly written question.

Hide a section as in don't process a section of the page if a DB field is
NULL

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:40*********************@newsreader.visi.com.. .
"Keith" wrote:
What is the correct code to use to hide a section if a specific DB
field is NULL.
Define "hide a section".
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.

Use of this email address implies consent to these terms. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 19 '05 #4
Jeff Cochran wrote:
On Fri, 9 Jul 2004 23:39:15 +0100, "Keith" <@.> wrote:
What is the correct code to use to hide a section if a specific DB
field is NULL.


Hide a section as in using DHTML to hide/unhide? Try a DHTML group
for that answer.

If you're looking for an ASP-only answer:

IF DBField <> Null Then
Response.Write "Hidden Section"
End If

Jeff

Minor correction:
IF Not DBField Is Null Then

or

If IsNull(DBField) = False Then

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #5
On Sat, 10 Jul 2004 08:50:10 -0400, "Bob Barrows [MVP]"
<re******@NOyahoo.SPAMcom> wrote:
Jeff Cochran wrote:
On Fri, 9 Jul 2004 23:39:15 +0100, "Keith" <@.> wrote:
What is the correct code to use to hide a section if a specific DB
field is NULL.


Hide a section as in using DHTML to hide/unhide? Try a DHTML group
for that answer.

If you're looking for an ASP-only answer:

IF DBField <> Null Then
Response.Write "Hidden Section"
End If

Jeff

Minor correction:
IF Not DBField Is Null Then

or

If IsNull(DBField) = False Then


Bleh! Should stop answering posts at 2:00 am... :)

Especially since I just ran through an IsNull() programming section
during the day.

Jeff
Jul 19 '05 #6
On Sat, 10 Jul 2004 13:34:28 +0100, "Keith" <@.> wrote:
Sorry - badly written question.

Hide a section as in don't process a section of the page if a DB field is
NULL
You can't "not process a page" because until you process the page you
can't determine if the field is null. You can branch based on it
being null, or else you'll need to use two pages, or try to accomplish
a conditional include, which is more work thatn the system should do.

Jeff
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:40*********************@newsreader.visi.com. ..
"Keith" wrote:
> What is the correct code to use to hide a section if a specific DB
> field is NULL.


Define "hide a section".
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.

Use
of this email address implies consent to these terms. Please do not

contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


Jul 19 '05 #7
IF (NOT ISNULL(DBField)) THEN
' Do something
ELSE
' Do Something else
END IF

This works best for me...
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter Neumaier | last post by:
Hi! I got a column, with different dates in it (Ddata type "nvarchar")... when running a SELECT on this column, I'm trying to filter those recordsets out, WHERE this column is NULL (I checked...
1
by: xixi | last post by:
we are using db2 udb v8.1 , from db2 command window, how can i see the value which has null in it? cause right now i only see it is blank, not knowing actually it is a null value, i can only know...
5
by: msnews.microsoft.com | last post by:
Hello. How can I check if DataSet field value is Null?
2
by: Sam | last post by:
Access quickie question- Have a table called ValidAxes. Design as follows- FieldName Type Null OK ? -------------------------------- ProcessType Text NO EEType Text ...
1
by: gtwannabe | last post by:
I'm having a problem with a form that uses AutoNumber as the primary key. I have an Abort button to delete the current record and close the form. If AutoNumber is assigned, the code executes a...
1
by: aboon | last post by:
Hi I need help with showing field when checkbox checked and hiding field when the checkbox is unchecked. I was able to do it using dropdownlist but I'm not able to do it with checkboxlist at all....
2
by: Resmy Ravi | last post by:
how to make a field null in access
3
by: BobbyD1120 | last post by:
I have created a inventory tracking database and I want to show/hide certain fields based on the device category. The deviceCategory field is a lookup field to a table that lists all the different...
1
by: sumreen hassan | last post by:
how to show all null fields of query during run time? for example if one column of record is null all record is skiped please help me about this problem
1
by: ramyasakthi | last post by:
how to catch the appropriate null pointer exception for preparestatement while insert to oracle db
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.