Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 2nd, 2006, 11:17 PM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Get the error "ADODB.Recordset error '800a0e7d' "

 I'm trying to connect to an Access database and retrieve data. I'm getting the folloring error message:

ADODB.Recordset error '800a0e7d'

The connection cannot be used to perform this operation. It is either closed or invalid in this context.

/legco/script/common.inc, line 52

The code used is as follows:
sRSSource will input a SQL

Function GetRecordset(sRSSource)
    Dim objRSGetRecordset

    Set objRSGetRecordset = Server.CreateObject("ADODB.RecordSet")
'' objRSGetRecordset.Open sRSSource, cnn, adOpenStatic, adLockOptimistic
    objRSGetRecordset.Open sRSSource, cnn, adOpenStatic, adLockReadOnly

    Set GetRecordset = objRSGetRecordset

    Set objRSGetRecordset = Nothing
End Function

Any help or suggestion is much appreciated!



Reply With Quote
  #2 (permalink)  
Old July 24th, 2006, 11:49 PM
Friend of Wrox
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran

solution here

(Anything is Possible)
Reply With Quote
  #3 (permalink)  
Old August 5th, 2006, 03:53 PM
Friend of Wrox
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway

There are two reasons for this error.

1- Sql query contain an invalid database column name.
2- System can not read from connection variable.

Do Following:
Check your sql query and if there is a complex query try checking it by temrorary replacing it with a simple one i.e "SELECT * FROM tblRecords"

If you still get the same problem then

Write following after Function GetRecordset(sRSSource) statement and execute the page again.

If page does not display anything then check you connection variable i.e 'cnn'. You probably need to define 'cnn' variable before database connection string i.e 'dim cnn'

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: ADODB.Recordset error '800a0e7d' comets Classic ASP Databases 5 October 15th, 2011 11:27 AM
ADODB.Recordset error lance Wrox Book Feedback 2 February 23rd, 2007 02:37 PM
ADODB.RecordSet -- Error nabeeljohn Classic ASP Professional 10 November 9th, 2006 05:23 AM
ADODB.Recordset error '800a0e7d' hurler Classic ASP Databases 4 August 28th, 2003 09:47 PM

All times are GMT -4. The time now is 11:21 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.