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 August 31st, 2004, 01:45 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB.Recordset error '800a0e78'

Hi, I'm trying to create a dynamic table populated with employee contact info. I know there must be a lot of canned soluitions, but thought I try it. Unfdortunately I'm getting the error message in my subject line.
************************************************** *********
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.

/HR/EMPLOYEE_DIRECTORY/directory.asp, line 41
************************************************** *********

Here's what's on Line 41:

************************************************** *********
Line 41: <% do until rsEmployees.eof =true %>
************************************************** *********

... and the rest of the code to generate the table follows as such:


<tr>
    <td><%=(rsEmployees.Fields.Item("EmployeesID").Val ue)%></td>
    <td><%=(rsEmployees.Fields.Item("DepartmentName"). Value)%></td>
    <td><%=(rsEmployees.Fields.Item("Last_Name").Value )%></td>
    <td><%=(rsEmployees.Fields.Item("First_Name").Valu e)%></td>

************************************************** *********
... and so on.. until I have this other piece of code:

<%
  rsEmployees.MoveNext
loop
%>
</table>


Any help would greatly reduce my frustration <smile!>
Thanks all,
Nancy
 
Old August 31st, 2004, 01:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

What about the code above that line? That is where your problem is going to be. Post that too.

Brian
 
Old August 31st, 2004, 02:00 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey, thanks for your quick response...
Here's what's before Line 41:

************************************************** **********


<%
Dim rsEmployees
Dim rsEmployees_numRows

Set rsEmployees = Server.CreateObject("ADODB.Recordset")
'rsEmployees.ActiveConnection = MM_employee_directory_STRING
rsEmployees.Source = "SELECT * FROM Employees ORDER BY Last_Name ASC"
rsEmployees.CursorType = 0
rsEmployees.CursorLocation = 2
rsEmployees.LockType = 1
'rsEmployees.Open()
%>
<table border="1" cellpadding="0" cellspacing="4">
  <tr>
    <td>EmployeesID</td>

... and so on...

************************************************** ***************

Nancy
 
Old September 1st, 2004, 08:12 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Brian, do you need more info?
 
Old September 1st, 2004, 09:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

You have the rsEmployees.Open() method commented out. That needs to be there for you to access the properties.

Brian
 
Old September 1st, 2004, 09:22 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thx, Brian for getting back to me. 'K, I removed the "comment out", so that that line is read, (not sure why I did a stupid thing like that to begin with, but anyway...)

I'm still getting errors ; Here it is:

ADODB.Recordset error '800a0e7d'

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

/HR/EMPLOYEE_DIRECTORY/directory.asp, line 25

Oddly enough, that line is EXACTLY the line we just put back in??

Line 25: rsEmployees.Open()
 
Old September 1st, 2004, 09:42 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thx Brian for all your help. This problem is solved.

Have a great day!





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error 800a0e78 quinnie Classic ASP Databases 6 October 2nd, 2007 05:13 PM
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 '800a0e78' Orpheus Classic ASP Databases 2 March 27th, 2006 10:05 AM
ADODB.Recordset error '800a0cc1'Item cannot be.... ashu_gupta75 Classic ASP Databases 1 March 5th, 2004 03:50 AM





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