Jump to content
Compatible Support Forums
Sign in to follow this  
Four and Twenty

ASP + MSAccess + IIS 5.1 was working and suddenly stopped! W

Recommended Posts

I have been rebuilding a website that I made about a year ago. The rebuild is an all asp driven site connected to an ms access database. I pulled the tables and java scripts off of the old page and put it in an ms access database and the whole thing has been working great for about a week. then this morning at like 11:30 i get this error when I use any of the pages that atempt to add or change the values in the database.

 

___________________________________________________________

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 kindbuds.dns2go.com: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 (0x80040E21)

Cannot update. Database or object is read-only.

/upcomingedit/process_change.asp, line 86

 

 

Browser Type:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)

 

Page:

POST 184 bytes to /upcomingedit/process_change.asp

 

POST Data:

eventlocation=Baltimore&eventstartmonth=1&eventstartday=19&eventstartyear=2002&eventendmonth=2&eventendday=24&eventendyear=2002&eventdescription=American+Crafts+Concil+Show%0D%0A%0D%0A

 

 

_______________________________________________________________

here is the asp code that accesses the database i will place a ---> on the line 86 that the error is refering to it is when it attempts to delete the record.

-----------------------------------------------------------------

<!-- #INCLUDE FILE="access.asp" -->

<%

if not Session("pass") = "good" Then

Response.Write "no password = no access"

Response.End

end if

 

 

Dim theDatabase,theRecordset

 

Set theDatabase = InitDatabase("../database.mdb")

Set theRecordset = GetRecordset(theDatabase,"SELECT * FROM upcoming")

 

eventlocation = Request.Form("eventlocation")

 

if(eventlocation = "") Then

Response.Write "Fill in all the Feilds, Go Back and Try Again"

Response.End

end if

 

eventstartmonth = Request.Form("eventstartmonth")

 

if(eventstartmonth = "") Then

Response.Write "Fill in all the Feilds, Go Back and Try Again"

Response.End

end if

 

eventstartday = Request.Form("eventstartday")

 

if(eventstartday = "") Then

Response.Write "Fill in all the Feilds, Go Back and Try Again"

Response.End

end if

 

eventstartyear = Request.Form("eventstartyear")

 

if(eventstartyear = "") Then

Response.Write "Fill in all the Feilds, Go Back and Try Again"

Response.End

end if

 

eventendday = Request.Form("eventendday")

 

if(eventendday = "") Then

Response.Write "Fill in all the Feilds, Go Back and Try Again"

Response.End

end if

 

eventendmonth = Request.Form("eventendmonth")

 

if(eventendmonth = "") Then

Response.Write "Fill in all the Feilds, Go Back and Try Again"

Response.End

end if

 

eventendyear = Request.Form("eventendyear")

 

if(eventendyear = "") Then

Response.Write "Fill in all the Feilds, Go Back and Try Again"

Response.End

end if

 

eventdescription = Request.Form("eventdescription")

 

if(eventdescription = "") Then

Response.Write "Fill in all the Feilds, Go Back and Try Again"

Response.End

end if

 

 

nid = Request.QueryString("id")

 

if nid = "" Then

Response.Write "Please pass an ID to delete!"

Response.End

End If

 

sqlstr = "SELECT * FROM upcoming WHERE id = " & nid

 

Set theDatabase = InitDatabase("../database.mdb")

Set theRecordset = GetRecordset(theDatabase,sqlstr)

 

' Delete Record here

if Not theRecordset.EOF Then

theRecordset.MoveFirst

--> theRecordset.Delete <----

End If

 

theRecordset.AddNew

theRecordset.Fields("EventLocation") = eventlocation

theRecordset.Update

 

theRecordset.Fields("EventStartDay") = eventstartday

theRecordset.Update

 

theRecordset.Fields("EventStartMonth") = eventstartmonth

theRecordset.Update

 

theRecordset.Fields("EventStartYear") = eventstartyear

theRecordset.Update

 

theRecordset.Fields("EventEndDay") = eventendday

theRecordset.Update

 

theRecordset.Fields("EventEndMonth") = eventendmonth

theRecordset.Update

 

theRecordset.Fields("EventEndYear") = eventendyear

theRecordset.Update

 

theRecordset.Fields("EventDescription") = eventdescription

theRecordset.Update

theRecordset.Close

Set theRecordset = Nothing

 

theDatabase.Close

Set theDatabase = Nothing

 

 

Response.Redirect "index.asp"

 

%>

-----------------------------------------------------------

 

I have the page hosted at brinkster and it all works there. with exactly the same files except the asp library with the database connection information in it. But as i said the iis was workin perfect on my computer for like a week and then all the sudden i get this error. so i have checked all the directory security and whatnot. whats more non of the database driven sites will run on my computer if they attemp to delete the values in the database. wtf!

 

clutch do you know what to make of this

Share this post


Link to post

I am in a hurry -- my wife waiting by the car -- right now. Therefore, I have not checked you posting in detail. I'll stop by tonight when I return to see if there is something else I can help with.

 

Suddenly, this comes to mind as a long. but possible, shot. If using ODBC, data source-DSN should be in system, not user...darn I should have checked more of your posting. Good luck, I'll come back later.

Share this post


Link to post

A couple of quick things to check. First, for some reason did the database NTFS permissions get switched to "Read Only"? Also, do you have another app using that ODBC connection, or do you have Access itself connected to it at the same time?

Share this post


Link to post

it used to work with access opened now it doesn't

i checked to make sure that it is not read only in the database. But this happens with a bunch of other databases that i haven't touched for a long time. any time you try and delete a value out of any database it returns that error.

Share this post


Link to post

LOL, I thought I was crazy, but I had the same issue. There was something recent that did this, because when I used system DSNs I could connect as many times as I wanted and not get the error, but I can't do that anymore (no bother, as I use SQL 2000 anyway, but kind of annoying). What have you done recently? Have you upgraded to MDAC 2.7? You can get that here:

 

http://www.microsoft.com/data/download_270RTM.htm

 

You might have applied a patch recently, so let's see what was done.

Share this post


Link to post

nope nothing like that i was sitting there working on my computer then one minute it worked and the next minute it gave the error and has given the error ever since. I am reinstalling right now cause i got too pissed off and i really need to get it to work so i can get some work done.

Share this post


Link to post

If you can, just make the jump to some form of SQL or MSDE 2000 (which comes with Office XP, VS.NET, Visio 2002 and some other programs) as those natively support multiple connections. I experienced the exact same problem you found, but since I only had one DB that was in Access and I was going to upgrade it to MS SQL, I didn't fiddle with it any further. At one time, I could have the site running *and* be able to connect to the DB in Access or Visual Studio to modify the views (queries) for tuning.

Share this post


Link to post

how do i make an sql database

i am willing to learn. I just learned asp over the past week. I was using java/css/html which worked ok but was a bit of a management headache. Now with asp i can integrate all the java/css and generate all the pages on the fly from a webeditable database. So if I can just make an sql database just like that and start askin it to do stuff i am all for it.

Share this post


Link to post

i have office xp and visual studio 6 i need to get me a copy of VS.NET cause i have a site hosted on a .NET beta server and i would like to start using some .NET code asap since i am just getting started i want to learn the latest

Share this post


Link to post

Well, you can still write the ASPX files in anything (like Notepad), but you still need some sort of database application which you haven't listed yet. Getting VS.NET will not necessarily solve your problem unless you install MSDE 2K from it, or some other SQL DB server app.

Share this post


Link to post

so i could get like SQL server? and that would do it?

 

BTW i got my iis working by adding a workgroup file to access. I think that my problem has something to do with the "_derived" folders that interdev has added to my directories.

Share this post


Link to post

Ummm, getting (any version of) SQL is similar to getting any application: it *can* do stuff, but you still have to tell it what to do. Most SQL-centric RDBMS run on the concept of an "engine", whereby the server handles incoming requests directly and then gives back the information. Access, on the other hand, is client based and relies on the requesting computer to open the file, ask for the information, and then close out its connection. Each client is also responsible for error checking/transaction handling (and a frequent cause of errors, hence the built-in user count restrictions depending on what you are doing). This type of database is fine for small workgroups and such, and they are typically royalty free when distributed by developers. Now, if you want something that scales well and is *designed* for multiple concurrent connections, then step up to MS SQL, PostgreSQL, MySQL, Oracle, Progress, etc. I use MS SQL, and I am somewhat familiar with Progress since it is what we use for our ERP system. For simplicity, I would try to get one of the MS versions since it sounds like you have access to a MSDN subscription. I use the Enterprise version on the development boxes myself, but any of them should work fine.

 

As for the Access error, I can't see why it would suddenly need a workgroup file, nor would I use one. But then again, I try to stay away from Access once I am beyond the initial layout phase of a project.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×