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 December 8th, 2003, 08:53 AM
Registered User
Join Date: Dec 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Read-only Databse!

Hi Guys, just registered to the service.
Been taking a look at some of the Forums, looks very interesting.
I Have been trying to learn ASP over the last month, using the WROX books, (Begining ASP 3.0). going quite well at the moment.
However while doing one of the exercises in the book, Chapter 15, i have come across a problem with my database.
The error reads:

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.


Please try the following:

Click the Refresh button, or try again later.

Open the localhost:81 home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services


Technical Information (for support personnel)

Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
/BegASP/AddUser.asp, line 13

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)

POST 119 bytes to /BegASP/AddUser.asp

POST Data:
email=h&GivenName=h&FamilyName=h&Address1=h&Addres s2=&City=h&State=h&PostalCode=h&Country=h&Password =h&VerifyPassword=h

08 December 2003, 12:32:55

More information:
Microsoft Support
---------------------------------------------------------------------My code is :

  Dim rsUsers
  Set rsUsers = Server.CreateObject("ADODB.Recordset")
  rsUsers.Open "Person", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable

  If Session("PersonID") <> "" Then ' currently logged-on user
    rsUsers.Filter = "PersonID = '" & Session("PersonID") & "'"
  Else ' New session
    rsUsers.Filter = "EMailAddress = '" & Request.Form("email") & "'" & _
                     "AND Password = '" & Request.Form("password") & "'"
    If rsUsers.EOF Then ' User not found
      rsUsers.AddNew ' ...so add a new record
' Else
' Email address and password matched with DB records -
' In this case we'll allow this to update user's personal details
    End If
  End If
                                                  ' write personal details to record
  rsUsers("EMailAddress") = Request.Form("email")
  rsUsers("Password") = Request.Form("password")
  rsUsers("FamilyName") = Request.Form("FamilyName")
  rsUsers("GivenName") = Request.Form("GivenName")
  rsUsers("StreetAddress1") = Request.Form("Address1")
  rsUsers("StreetAddress2") = Request.Form("Address2")
  rsUsers("City") = Request.Form("City")
  rsUsers("State") = Request.Form("State")
  rsUsers("PostalCode") = Request.Form("PostalCode")
  rsUsers("Country") = Request.Form("Country")
  rsUsers("Active") = True
  rsUsers("LastLogin") = Now
  rsUsers.Update ' update the database

  Dim strName, strValue ' create session variables
  For each strField in rsUsers.Fields
    strName = strField.Name
    strValue = strField.value
    Session(strName) = strValue
  Session("blnValidUser") = True ' declare that current user is validated
  Response.Redirect "MenuForRegisteredUsers.asp"


What shall i do?
How do i change the database, which i downloaded form the WROX website, from read-only to allowing me to make changes to it.

your help would be appreciated


Old December 8th, 2003, 09:21 AM
Authorized User
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to MAMBONO

Right click on the database file within an Explorer window and uncheck the read only property. Unless you are talking of other read rights here.
Old December 14th, 2003, 09:06 PM
Authorized User
Join Date: Jun 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts

oh man
i am having exactly the same problem

Microsoft JET Database Engine error '80040e09'
Cannot update. Database or object is read-only.

i right clicked in the properties it is definetly NOT read only
the only thing i can see is that the Mode in the connection string is
i tried doing this...
objConn.Mode = adModeShareDenyNone
which seems to have no effect

sorry to ask a question in fonsys thread
but it looks like we are having the same problem

can anyone help?
Old December 15th, 2003, 01:29 AM
Authorized User
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to MAMBONO

I have experienced another sort of similar error before, though mine had an error code of 80004005 and not the one above, but never sorted it as I was not sitting at the server but I managed to simulate the problem locally and figured out that the IUSR account for IIS had not been given write permissions in the specific directory holding the database. If this does not sort out the problem as well, try out the following registry editing procedure:
Browse to Hkey_Local_Machine\Software\ODBC

On the Security menu, select Permissions.
Select Replace Permission on Existing Subkeys and set the permissions for the Everyone group to full control.
Old December 15th, 2003, 02:14 AM
Authorized User
Join Date: Jun 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts

im sorry..
where is the security menu?
Old December 15th, 2003, 03:08 AM
Authorized User
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to MAMBONO

Seems like your registry does not have the security menu, but first of all try the previous solution. The registry missing out some keys is a long process to fix and it might not be good at this point to get into that. I'm sure the first solution can fix the problem. I have tried it and I'm positive that it works. Set the security permissions via Windows explorer and rightclicking on the folder and checking security. Make sure the folder does not inherit permissions from parent folder and try and give everyone full control of the folder.

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can share my databse lalit_84m SQL Server 2000 1 May 31st, 2007 01:05 AM
Update databse from global dayash_r_prasad Classic ASP Databases 0 August 3rd, 2006 04:21 AM
retaining the session of the databse vmaruv SQL Server 2000 0 April 6th, 2005 10:02 AM
dataset to databse update nashnash ASP.NET 1.0 and 1.1 Professional 1 December 10th, 2004 01:05 PM

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