Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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, 02:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default ADODB.Recordset error '800a0cb3'

Can someone please help me on figuring out adding/updating new records on an ACCESS Database please? Below is my code and the error message:

Error Message

ADODB.Recordset error '800a0cb3'
Object or provider is not capable of performing requested operation.

Program Code

!--#include file="Connection.asp"-->


<%

  Dim rsUsers
  Set rsUsers = Server.CreateObject("ADODB.Recordset")
  sqlString= "SELECT * FROM Member WHERE SSN =" & Request.Form("SSN") & ";"
  rsUsers.Open sqlString, objConn

    If rsUsers.EOF Then
      rsUsers.AddNew
   Else
     rsUsers.Update
   End If

%>

Include File Connection.asp

<%
  Dim curDir
  Dim objConn
  curDir = Server.MapPath("db/HFPension.mdb")
  Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & curDir

%>
 
Old July 16th, 2003, 03:06 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:rsUsers.Open sqlString, objConn

Try this line instead:
rsUsers.Open sqlString,objConn,adOpenKeyset,adLockOptimistic,ad CmdText

...but the Soon is eclipsed by the Moon
 
Old July 16th, 2003, 03:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default



I tried this earlier and the error message I got was

Microsoft JET Database Engine error '80040e09'

Cannot update. Database or object is read-only.

/hfrrfnew/AddUser.asp, line 28


Where line 28 in the program is rs.Users.AddNew

I don't know why it's telling me that it's read-only. I checked the ACCESS Database permission and it is not read-only.

This used to work when all the programs and the database were in my workstation and my workstation is serving as the server. Now I transferred everything to a server and this happened. I can read and retrieve data from the server using other ASP programs though. I just can't write to it. Please help me on this problem.

Thanks,
Judy
 
Old July 16th, 2003, 03:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had this problem once. I could not figure it out as well since it was not marked as read only. Seems like it was a permissions problem. The folder or file permissions allowed me to read, but not write/modify.

Check your permissions and go from there.

Chris
 
Old July 16th, 2003, 04:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

I checked all permissions earlier but missed the web anonymous users. That had read-only permission. I changed it to read/write permission and tried my program again. It worked.

Thanks guys for all your help and patience.

Judy





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error '800a0cb3' klittlejohn SQL Server ASP 2 January 19th, 2004 10:17 PM
ADODB.Recordset error '800a0cb3' khalid08 Classic ASP Databases 1 September 23rd, 2003 07:15 AM
ADODB.Recordset error '800a0cb3' jmss66 Classic ASP Databases 1 July 16th, 2003 04:18 PM





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