 |
| 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
|
|
|
|

August 31st, 2004, 01:45 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

August 31st, 2004, 01:56 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
What about the code above that line? That is where your problem is going to be. Post that too.
Brian
|
|

August 31st, 2004, 02:00 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

September 1st, 2004, 08:12 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Brian, do you need more info?
|
|

September 1st, 2004, 09:11 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
You have the rsEmployees.Open() method commented out. That needs to be there for you to access the properties.
Brian
|
|

September 1st, 2004, 09:22 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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()
|
|

September 1st, 2004, 09:42 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thx Brian for all your help. This problem is solved.
Have a great day!
|
|
 |