![]() |
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 |
Re: Show if DB field NOT NULL
"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. |
Re: Show if DB field NOT NULL
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 |
Re: Show if DB field NOT NULL
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" <GTSPXOESSGOQ@spammotel.com> wrote in message news:40ef4669$0$235$a1866201@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. > > |
Re: Show if DB field NOT NULL
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" |
Re: Show if DB field NOT NULL
On Sat, 10 Jul 2004 08:50:10 -0400, "Bob Barrows [MVP]"
<reb01501@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 |
Re: Show if DB field NOT NULL
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" <GTSPXOESSGOQ@spammotel.com> wrote in message >news:40ef4669$0$235$a1866201@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. >> >> > |
Re: Show if DB field NOT NULL
IF (NOT ISNULL(DBField)) THEN
' Do something ELSE ' Do Something else END IF This works best for me... |
| All times are GMT. The time now is 01:04 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.