473,803 Members | 3,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connection error: ADODB.Recordset (0x800A0E7D)

I have been copying and pasting code and this has been working, but now I
get this error:
Error Type:
ADODB.Recordset (0x800A0E7D)
Operation is not allowed on an object referencing a closed or invalid
connection.
/forms/maintreqresults 1.asp, line 26.

I'm sure I'm missing something simple, but I am at a loss with this. The
code is below, the URL string appears to be valid:
http://sd-school/forms/maintreqresul...on=edit&id=700
<!-- #include file="../adovbs.inc" -->
<%
server.execute "../header.htm"

DIM objConn, objRS
Set objConn = Server.CreateOb ject("ADODB.Con nection")
strConn= "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=c:\main\ maint.mdb"

strAction = request.queryst ring("action")
strID = request.queryst ring("id")
Select Case strAction

Case "edit"

If IsNumeric(strID ) Then
strID = CLng(strID)
Else
strID = 0
End If

Set objRS = Server.CreateOb ject("ADODB.Rec ordset")
strSQL = "SELECT * FROM service WHERE id=" & strID & ";"
objRS.Open strSQL, objConn, adOpenKeyset, adLockOptimisti c, adCmdText
<-line 26

objRS.MoveFirst

objRS("dcomp") = Request.Form("d comp")
objRS("time") = Request.Form("t ime")
objRS("reason") = Request.Form("r eason")
objRS("action") = Request.Form("a ction")
objRS("who") = Request.Form("w ho")

objRS.Update
objRS.Close
Set objRS = Nothing
End Select
%>

Thanks again for all of the help!
Jul 19 '05 #1
2 10504
It appears you never opened your ADODB connection.

Ray at work

"Tom Petersen" <pe****@sdsd.sd bor.edu> wrote in message
news:eZ******** ******@TK2MSFTN GP12.phx.gbl...
I have been copying and pasting code and this has been working, but now I
get this error:
Error Type:
ADODB.Recordset (0x800A0E7D)
Operation is not allowed on an object referencing a closed or invalid
connection.
/forms/maintreqresults 1.asp, line 26. objRS.Open strSQL, objConn, adOpenKeyset, adLockOptimisti c, adCmdText

Jul 19 '05 #2
Doh, thanks, that was it. Did I mention that web design isn't my primary
job function? :)

Thanks again!

"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:#2******** ******@tk2msftn gp13.phx.gbl...
It appears you never opened your ADODB connection.

Ray at work

"Tom Petersen" <pe****@sdsd.sd bor.edu> wrote in message
news:eZ******** ******@TK2MSFTN GP12.phx.gbl...
I have been copying and pasting code and this has been working, but now I get this error:
Error Type:
ADODB.Recordset (0x800A0E7D)
Operation is not allowed on an object referencing a closed or invalid
connection.
/forms/maintreqresults 1.asp, line 26.

objRS.Open strSQL, objConn, adOpenKeyset, adLockOptimisti c, adCmdText


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2273
by: middletree | last post by:
I had some text links at the top of all my pages (in one include file), which worked just fine. But I was asked to make it so that people in a certain department, (this is an Intranet app) would see a particular link that nobody else would. You'd find their name by getting their network logon. This worked fine on all my pages, but for some reason, on one page, it gives me an error. First, the error: Error Type: ADODB.Recordset...
4
6777
by: James | last post by:
We've had a recurring problem where all of a sudden we get a DBMSSOCN General Network Error on any page that connects to SQL Server. Then we have to reboot the server and everything works fine again, for a few more hours and then we have the same problem. Someone suggested adding ";Network Library=DBMSSOCN" to our connection strings. I've tried to figure out exactly what this does and why not having it would be a problem. Any ideas?...
9
17039
by: mcbill20 | last post by:
Hello all. I just installed Oracle 10g developer tools on a machine running XP Pro and Office XP. Before this I had just the Oracle 9 client installed. I the previous configuration, I was able to access any of the Oracle tables on another machine but now I am having problems. Unfortunately, I don't remember the correct syntax for the ODBC connect string and I am hoping that is my whole problem. I am trying to connect to an Oracle 9...
2
4447
by: Jozef | last post by:
Hello, I'm trying to create a central function that runs a connection to an SQL Server database. The connection etc works, but when I try to call it, I get an error saying "Runtime-Error 91: Object variable or with block variable not set". I have pasted the code below. The first section is the function that I'm using, the second function is only the test that calls teh genErrorColl function '***************** Start Code...
0
7721
by: gm | last post by:
Immediately after generating the Access application from the Source Safe project I get: "-2147467259 Could not use ''; file already in use." If Access database closed and then reopened I get: "-2147467259 The database has been place in a state by user 'Admin' on machine ..... that prevents it from being opened or locked."
3
2080
by: nordwall | last post by:
Hi! I am starting out with ASP and have tried the following code, to no avail as I get a error: ADODB.Recordset.1 (0x800A0E7D) Invalid connection. /save.asp, line 12 <% uuid = Request("uuid")
7
10556
by: STUPIDFORUM | last post by:
ADODB.Recordset "The connection cannot be used to perform this operation." "Microsoft Access Driver" ERROR 0X800A0E7D OLE exception from "ADODB.Recordset": The connection cannot be used to perform this operation. It is either closed or invalid in this context. Win32::OLE(0.1707) error 0x800a0e7d in METHOD/PROPERTYGET "Open" !stupid registrations! !STUPID FORUMS! STUPID MICROSOFT !NOTHING WORKING!
9
1950
by: =?Utf-8?B?VCBNY0RvbmFsZA==?= | last post by:
I'm having some issues with a dll I've created to return an ADOConnection back to an ASP script. I successfully open my object: mytest = Server.CreateObject("mydll.database") I then attempt to use the connection: myConnection = mytest.getConnection This is where the script breaks down with an "Object required" error.
0
1984
by: Robert Avery | last post by:
In VBA/VB6, I had a class (incomplete sample below) that watched and displayed for the user all connection events, so that I could easily see what SQL was taking a long time, and when it freezes, I could see what is the SQL that freezes the program. I wanted to replicate this for VB.NET, but the SqlConnection object does not seem to support nearly as rich a set of events as the ADODB.Connection object. Any ideas where these events went,...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.