SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unable to make database writable

    Using VBScript to do insert/update queries, I get:

    Operation must use an updateable query.

    I've already searched the web, and know I have to set the file permission of my Access .mdb file, by going to properties and select Security tab.

    However, there is no Security tab. I've logged in as Adminstrator, right click the .mdb to Properties and there's just General, Summary, and Icon tab.

    The db resides in NTFS drive.

    Any ideas how I can make the .mdb writable?
    Work smarter, not harder. -Scrooge McDuck

  2. #2
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maybe you should post your code here

  3. #3
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You need to make the folder that the database resides in have write permissions for the IUSER account.

  4. #4
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Thing
    You need to make the folder that the database resides in have write permissions for the IUSER account.
    Where do I go to do that?

    In the folder's properties, I only have General, Sharing, Web Sharing, and Customize tab.

    Using WinXP Pro.

    afrika, didn't post my code here 'cos it's not a code related problem. But here it is if you wanna see it.

    Code:
      
      <%
         strConnect = "Provider = Microsoft.Jet.OLEDB.4.0;" + "Data Source = " + Server.MapPath("meme.mdb") +_
     				";Persist Security Info = False"
      
         strSQL = "UPDATE musics SET OnLoan = true WHERE AlbumID =" + id
         
      	Set objConnect = Server.CreateObject("ADODB.Connection")
      		objConnect.Open strConnect
      
      	Set objCommand = Server.CreateObject("ADODB.Command")
      		objCommand.ActiveConnection = objConnect
      		objCommand.CommandText = strSQL
      		objcommand.CommandType = 1
      		objCommand.Execute	
      %>
    Work smarter, not harder. -Scrooge McDuck

  5. #5
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Goto Tools > Folder Options.

    Scroll All the way down to the bottom and untick "Use simple File sharing", click apply etc.

    Right click on the database, and goto properties, you will now see a security tag. Go into that, then click add, you will have to use the search function, which you will then find IUSR, select that and then give it full permissions to read/write etc.

    Gav


  6. #6
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I did that to the database file, and got the error "Could not use ''; file already in use.".

    I then googled a bit and found out I had to do the same to the directory it's in, once I've done that everything seems to be ok now.

    For the record, the only permission I needed to ticked for both was Write.
    Work smarter, not harder. -Scrooge McDuck


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •