Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / General ASP Topics / July 2009



Tip: Looking for answers? Try searching our database.

Operation is not allowed when the object is closed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Les Juby - 30 Jun 2009 23:37 GMT
Hi

Could anyone please tell me why the following code could be generating
the error....

--------------------------
INSERT INTO Agent_Area (area_rec_id, agent_rec_id) values (99, 200)
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/area_select_process.asp, line 49
--------------------

(Line 49 is the execute statement )

After the error, the database corrupts.  If I replace the INSERT
statement with a SELECT * statement then there are no errors and the
code runs fine.????

<%
dbPath = "d:\accounts\brokerjunction\databases\ciAgent_Area.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath

SQLstmt = "INSERT INTO Agent_Area (area_rec_id, agent_rec_id) values
(99, 200)"

Set RS = Conn.Execute(SQLstmt)

''''RS.Close
''''set RS = Nothing
Conn.Close
%>

thanks

 .les.
Evertjan. - 01 Jul 2009 09:30 GMT
Les Juby wrote on 01 jul 2009 in microsoft.public.inetserver.asp.general:

> Could anyone please tell me why the following code could be generating
> the error....
[quoted text clipped - 11 lines]
> statement with a SELECT * statement then there are no errors and the
> code runs fine.????

Seems to me you have read-only permission on that database file.

Signature

Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Les Juby - 01 Jul 2009 11:40 GMT
Thanks for the pointer.  It was the right direction.

There was a corrupt entry for the permissions on the server.  Deleded
the db, renamed the local copy, sent up, set permissions, changed code
references, and all has worked.

The "Operation not allowed..." error actually referred to closing a
record set that had never been opened as this was an insert command.

Thanks again

  .les.

>Les Juby wrote on 01 jul 2009 in microsoft.public.inetserver.asp.general:
>
[quoted text clipped - 15 lines]
>
>Seems to me you have read-only permission on that database file.

o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
 Les Juby        lesjuby@anti-spam.iafrica.com
 Webpro Internet - - - Prosoft Microsystems
 Durban, KwaZulu-Natal, South Africa
 P.O.Box 35243, Northway 4065, South Africa
 Tel: +27 31 563-8344   Fax: +27 31 564-4928
o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
(you *do* know to take "anti-spam" out the address....?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.