View Full Version : Trouble in web Database

07-04-2007, 08:51 AM
I have a website written in ASP.
I am facing a problem, that i am unable to write anything to the database (I am using MS Access database). I can easily read from the the db without any problems.

When i submit a form, which needs to be stored in the db, i get an error stating that database or object is write protected.
It works perfectly fine on localhost...

i am using this particular code to connect to the db in global.asa file:

Application("connStr") = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("cart.mdb") & ";User ID=admin;password=;"

I have also tried this method :

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("\somepath\dbname.mdb") & ";User Id=admin;Password=pass;"

Can anyone plz help me...

PS : another thing i wanted to inform is, that the submit form button does not work in firefox... nothing happens when it is clicked...

the problem occurs after trying to buy any item from the shopping cart, when the user fills in an order-form...

it is at that particular page, when i click on submit, that i get this error message.
also, the submit button doesn't work in firefox

07-04-2007, 02:24 PM
have you got a link to your website? i'm no expert, but writing to the database sounds like a permission problem on your host. if they provide a folder called db use it, this is set up especially for databases!

07-04-2007, 05:20 PM
you need to set permissions on the access database and the directory that contains the db to read/write. most hosts will tell you where you need to place the access database or at least how to set the permissions correctly.