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

  • Home
  • SEARCH
  • 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 811505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:03:21+00:00 2026-05-15T01:03:21+00:00

Good Morning, I have got the following function: FUNCTION queryDatabaseCount(sqlStr) SET queryDatabaseCountRecordSet = databaseConnection.Execute(sqlStr)

  • 0

Good Morning,

I have got the following function:

 FUNCTION queryDatabaseCount(sqlStr)
        SET queryDatabaseCountRecordSet = databaseConnection.Execute(sqlStr) 
        If queryDatabaseCountRecordSet.EOF Then
            queryDatabaseCountRecordSet.Close
            queryDatabaseCount = 0
        Else
            QueryArray = queryDatabaseCountRecordSet.GetRows
            queryDatabaseCountRecordSet.Close
            queryDatabaseCount = UBound(QueryArray,2) + 1
        End If
    END FUNCTION

And the following dbConnect:

SET databaseConnection = Server.CreateObject("ADODB.Connection")

    databaseConnection.Open "Provider=SQLOLEDB; Data Source ="&dataSource&"; Initial Catalog ="&initialCatalog&"; User Id ="&userID&"; Password="&password&""

But for some reason I get the following error:

ADODB.Recordset error '800a0e78'

Operation is not allowed when the object is closed.

/UBS/DBMS/includes/blocks/block_databaseoverview.asp, line 30

Does anyone have any suggestions?

Many Thanks,
Joel

  • 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-15T01:03:22+00:00Added an answer on May 15, 2026 at 1:03 am

    Long time since I touched asp/ado but I have some vague memory about EOF not always being a reliable indicator:

    If (rst.BOF And rst.EOF) Then
    --
    Else
    --
    End If
    

    As an aside, you shouldn’t really be determining a record count that way. Preferably execute a statement or proc that returns only the count, rather than returning the rows then counting them.

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

Sidebar

Ask A Question

Stats

  • Questions 519k
  • Answers 519k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should use mysql_insert_id (or the equivalent call for the… May 16, 2026 at 8:26 pm
  • Editorial Team
    Editorial Team added an answer It is a bug in Hash::Util. The code says: sub… May 16, 2026 at 8:26 pm
  • Editorial Team
    Editorial Team added an answer If you can use only a single regexp and you… May 16, 2026 at 8:26 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Good morning. As the title indicates, I've got some questions about using python for
Good morning I have been running a few tests over the past couple of
Good morning. I have an XML file which contains lists of warning and errors
Good morning, I have a .Net 2.0 runtime DLL that I am trying to
Good morning! We have a SVN-Repository, which holds a VS-Solution. In this solution are
Good morning! I Have an issue with a wysiwyg editor that saves html to
Good morning. I have several pages with content that correspond to some products details.
good morning, I have created a new content type - petition, a last step
Good Morning All, I have created a different background and a few other images
hi dear friends and good morning The following question may be complicated and critical

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.