Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 16th, 2003, 12:55 PM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help: 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.

/severity1.asp, line 7

The code used is as follows:

<%
dim objConn, objRS, strConn, dtNow, dtThen, tmNow, tmThen, dtUpdate, tmUpdate, tmOpen, tmSinceUpdate, color
strConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\sc-export\servicecenter.mdb"
set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open strConn
set objRS=Server.CreateObject("ADODB.Recordset")
objRS.Open("SELECT field1, field2, field3, field4, field5, filed6, field7 FROM probphasetkts")
%>

Any help or suggestion is much appreciated!

thanks...Sarah

 
Old July 16th, 2003, 01:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

use
objRS.Open "SELECT field1, field2, field3, field4, field5, filed6, field7 FROM probphasetkts",objConn
instead of:
objRS.Open("SELECT field1, field2, field3, field4, field5, filed6, field7 FROM probphasetkts")

...but the Soon is eclipsed by the Moon
 
Old July 16th, 2003, 01:26 PM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have made the suggested change and now recieve the following error message:

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/severity1.asp, line 7

Any thoughts...

Sarah

 
Old July 16th, 2003, 01:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

 
Quote:
quote:SELECT field1, field2, field3, field4, field5, filed6, field7 FROM probphasetkts


You have misspelled - "filed6" ;)

...but the Soon is eclipsed by the Moon
 
Old July 16th, 2003, 01:39 PM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

D'oh! (hand slaps head)

thanks for your speedy assistance!!!

Sarah

 
Old October 15th, 2011, 11:27 AM
Registered User
 
Join Date: Oct 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB.Recordset error '800a0e7d' The connection cannot be used to perform

I am getting the error

ADODB.Recordset error '800a0e7d'

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

/vi.asp, line 24

Here's my code : Please help !!!!!!!!

Code:
<html>
<head>
<title>Guestbook</title>
</head>
<body bgcolor="white" text="black">
<%

Dim adoCon 			'Holds the Database Connection Object
Dim rsAddFootballers		'Holds the recordset for the new record to be added to the database
Dim strSQL			'Holds the SQL query for the database


Set adoCon = Server.CreateObject("ADODB.Connection")


adocon.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\inetpub\wwwroot\Amuse.adb;Persist Security Info=False;"

Set rsAddFootballers = Server.CreateObject("ADODB.Recordset")


strSQL = "SELECT * FROM Footballers"


rsAddFootballers.Open strSQL, adoCon   <---------------------------------- LINE 24

Response.Write ("<table border=2 cellpadding=10><tr><th>Jersey Number</th><th>Name</th><th>Surname</th></tr>")

Do While not rsAddFootballers.EOF
	Response.Write ("<tr>")
	'Write the HTML to display the current record in the recordset
	Response.Write ("<td>")
	Response.Write (rsAddFootballers("Jersey_No"))
	Response.Write ("</td><td>")
	Response.Write (rsAddFootballers("Fname"))
	Response.Write ("</td><td>")
	Response.Write (rsAddFootballers("Lname"))
	Response.Write ("</td>")
	'Move to the next record in the recordset
	Response.Write ("</tr>")
	rsAddFootballers.MoveNext
Loop
Response.Write ("</table>")

rsAddFootballers.close
Set rsAddFootballers = Nothing
Set adoCon = Nothing
%>
</body>
</html>

Last edited by vicky8rk; October 15th, 2011 at 11:30 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Get the error "ADODB.Recordset error '800a0e7d' " Raymond Classic ASP Databases 2 August 5th, 2006 03:53 PM
ADODB.Recordset error '800a0cb3' klittlejohn SQL Server ASP 2 January 19th, 2004 10:17 PM
ADODB.Recordset error '800a0e7d' hurler Classic ASP Databases 4 August 28th, 2003 09:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.