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 8055139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:18:09+00:00 2026-06-05T08:18:09+00:00

I need help I am getting a constant blank page when connecting to a

  • 0

I need help I am getting a constant blank page when connecting to a database in classic asp. I have changed some of the connection string for security purposes. I know this string works because I can connect to it in vb.net.

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search Test</title>
</head>

<body>
<% 
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Data Source=ServerIP;Initial Catalog=Database;User ID=Username;Password=Password"

strSql = "SELECT * FROM categories Where idParentcategory=1 ORDER BY categorydesc ASC"

Set rs = Conn.Execute(strSql)

If rs.eof Then
   Response.write("No records returned")
End If

do until rs.eof
   Response.write(rs("categorydesc") &  "<br>")
   rs.movenext
loop

Conn.Close
Set Conn = Nothing
 %>
</body>
</html>
  • 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-06-05T08:18:10+00:00Added an answer on June 5, 2026 at 8:18 am

    If it’s showing a blank page, is it possible you have an on error resume next we can’t see (maybe it’s in an include file)?

    I would handle this by checking for eof and then only looping through the resultset if it is not empty.

    Set rs = Conn.Execute(strSql)
    
    If rs.eof Then
      Response.write("No records returned")
    Else
      do until rs.eof
        Response.write(rs("categorydesc") &  "<br>")
        rs.movenext
      loop
    End If
    
    rs.Close : set rs = nothing
    Conn.Close : set Conn = Nothing
    

    This isn’t really different from @03Usr’s answer except:

    1. You should be able to determine why the page is coming up blank.
    2. In addition to closing and disposing of your connection object, you really should also close and dispose of your recordset object (even if it is empty).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help getting git extensions to run with msysgit. I have had bad
I need help getting my java program ready for release. I have a program
I need some help getting data from several tables. This is the tables I
i need some help for getting my statics work... I use core data to
I need some help in understanding what is happening here .I am getting a
I need some help. Here's what I'm getting right now: img ref I need
I need some help getting a SQL query running the way I need. I
I need some help getting my head around thread safety and dictionaries. When adding
I have a dropdown menu and i need help getting the hover link to
I need some help getting correct results on fraction results. After adding them together

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.