Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6686075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:07:49+00:00 2026-05-26T05:07:49+00:00

First time poster and fairly new to ASP programming. I am trying to add

  • 0

First time poster and fairly new to ASP programming.

I am trying to add a functionality that checks if a field is empty, if so return a set value.
Here is what i have got so far:

'rsGlobalWeb is basicly declared the same as rsBackup just in a different asp file with also the db connection.
<%  If rsGlobalWeb("Serial") <> "" Then
        response.write("<td>" & rsGlobalWeb("Serial") & "</td>")
    Else
        SqlBackup = "SELECT * FROM CMDBbackup WHERE Naam_Cattools = '" &     rsGlobalWeb("Device_name") & "'" 
        Set rsBackup = Server.CreateObject("ADODB.Recordset")
        rsBackup.Open SqlBackup, dbGlobalWeb, 3
        If Not rsBackup.EOF Then
            If Not IsNull(rsBackup("Serial")) And (rsBackup("Serial") <> "")     Then     
                response.write("<td>" & rsBackup("Serial") & " (backup)</td>")
            Else
                response.write("<td>No historical data found</td>")
            End if
        End if
    End if
%>

Now for the problem: when there is a value in the backup database it shows that value combined with the “(backup)” behind it. So that is working fine. The problem is that when there is no value found, it does not return anything.

I have tried do to some google searches but perhaps i am overlooking something here.
Any thoughts what it could be?

Thanks in advance,

Erik

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:07:49+00:00Added an answer on May 26, 2026 at 5:07 am

    Your Response.Write statements are enclosed in an If Not rsBackup.EOF Then statement.

    Nothing will be written if there are no records in rsBackup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

( First-time poster and rather new in programming, so be patient, please! ) I'm
long time reader, first time poster. I’m coming with an issue that many of
First time poster. Im totally new to Android but I have manged to dreate
Long time lurker, first time poster. I have a page that can dynamically (with
First time poster, long time lurker :) I have a form setup that posts
First time poster, long time reader. I searched and found no questions that answered
I'm first time poster here trying to pick up some Python skills; please be
(first time poster, long time visitor via Google) I'm trying to extract the contents
long time reader/first time poster here. So I've got a checkbox array that posted
first time poster and TDD adopter. :-) I'll be a bit verbose so please

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.