Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permissions error on insert into Access 1

Status
Not open for further replies.

brad1978

Programmer
Feb 13, 2009
30
CA
Hi everyone,
I have a bit of a problem with an application I'm working on. I am submitting information to an access database and keep recieving this error "2147217900" which, from googling it, seems to be a permissions error on the access database. I have gone in and reset the permissions for the IUSR-XXXXX account to full control but still recieve this error. Can anyone help me clear this up?

Code:
dim CONN, RS, SQL
SET CONN = server.CreateObject("ADODB.Connection")
CONN.Provider = "Microsoft.Jet.OLEDB.4.0"
CONN.Open = "C:\inetpub\[URL unfurl="true"]wwwroot\asp_test\blog\blog.mdb"[/URL]


SQL = "INSERT INTO replies ([R_Blog_id], [R_postby], [R_posttime], [R_comments]) values ('"& R_Blog_id&"','"&R_postby&"','"&R_posttime&"','"&R_comments&"');"

on error resume next
CONN.Execute SQL', recaffected
if err<>0 then
  Response.Write("No update permissions!" & err)
else
  Response.Write("<h3>record added</h3>")
  response.Write("<p><a href='bloglist.asp'>Click to go back</a>")
end if
conn.close
 
look at the permision for the actual access db right click on the file.mbd and click on properties, click on security assign the permissions there

Hope this helps
 
another method is to place ALL of your databases in a separate folder and give that folder + all children (files/subfolders) access.

This way, you'll never need to worry about setting individual access restrictions.

--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top