Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Granting read/write permissions on database.

Granting read/write permissions on database.

Scheduled Pinned Locked Moved Web Development
databasehelpsysadmintestingbeta-testing
11 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    matjame
    wrote on last edited by
    #1

    Hello guys. I have an update problem that with my logoncheck.asp and when I googled the problem I found out it might be permission problems on the database. Now I have tried to grant permission on the database folder properties to allow read/write, but I still get the same error. Is there another way I can use to maybe grant this permission.Unless there is something else Im doing wrong. The error is Error # -2147467259 Operation must use an updateable query. SQL = UPDATE tbl_employees SET lastlogin = #29-Feb-2008# WHERE employeelogin = 'SIPHOSIBUYANE' Code is : ]]> "" and request.Cookies("shark_password") <> "" and request.form("ccokie") <> "false" then strUserid = request.Cookies("shark_user_id") strPassword = request.Cookies("shark_password") boolFromCookie = True end if end if '----------------------------------------------------- '----------------------------------------------------- 'Level 1 Basic Validation Testing '----------------------------------------------------- '----------------------------------------------------- 'Test for Entry of Member ID prior to Running Search '----------------------------------------------------- if (strUserID="") then ' Member ID Entered session("msg") = "

    " & dictLanguage("Error_NoUserID") & "

    " Response.Redirect "default.asp?opt=1" 'Run Search '----------------------------------------------------- else 'Run Database Lookup sql = sql_GetEmployeesByLogin(strUserID) 'response.write sql & "
    " Set rs = Server.CreateObject("ADODB.RecordSet") rs.open sql, conn, 3, 3 end if '----------------------------------------------------- '----------------------------------------------------- 'Level 2 Validation Testing '----------------------------------------------------- '----------------------------------------------------- 'Member ID Entered Now Run Search for Record '------------------------------------------- If rs.eof Then 'No Record Found, Bad ID rs.close session("msg") = "

    "

    Y G 2 Replies Last reply
    0
    • M matjame

      Hello guys. I have an update problem that with my logoncheck.asp and when I googled the problem I found out it might be permission problems on the database. Now I have tried to grant permission on the database folder properties to allow read/write, but I still get the same error. Is there another way I can use to maybe grant this permission.Unless there is something else Im doing wrong. The error is Error # -2147467259 Operation must use an updateable query. SQL = UPDATE tbl_employees SET lastlogin = #29-Feb-2008# WHERE employeelogin = 'SIPHOSIBUYANE' Code is : ]]> "" and request.Cookies("shark_password") <> "" and request.form("ccokie") <> "false" then strUserid = request.Cookies("shark_user_id") strPassword = request.Cookies("shark_password") boolFromCookie = True end if end if '----------------------------------------------------- '----------------------------------------------------- 'Level 1 Basic Validation Testing '----------------------------------------------------- '----------------------------------------------------- 'Test for Entry of Member ID prior to Running Search '----------------------------------------------------- if (strUserID="") then ' Member ID Entered session("msg") = "

      " & dictLanguage("Error_NoUserID") & "

      " Response.Redirect "default.asp?opt=1" 'Run Search '----------------------------------------------------- else 'Run Database Lookup sql = sql_GetEmployeesByLogin(strUserID) 'response.write sql & "
      " Set rs = Server.CreateObject("ADODB.RecordSet") rs.open sql, conn, 3, 3 end if '----------------------------------------------------- '----------------------------------------------------- 'Level 2 Validation Testing '----------------------------------------------------- '----------------------------------------------------- 'Member ID Entered Now Run Search for Record '------------------------------------------- If rs.eof Then 'No Record Found, Bad ID rs.close session("msg") = "

      "

      Y Offline
      Y Offline
      yogesh_kumar_agarwal
      wrote on last edited by
      #2

      Hi I also face the same problem while uploading my first web site, see if your program or webpage executes perfectly in offline mode then there are no problem with the code. This type of error occor mostly due to read write permission of the database, of it could the cause of cookies and caching and in this case try again after removing the cokkies and offline content from your system. With Regards Yogesh Agarwal

      M 1 Reply Last reply
      0
      • Y yogesh_kumar_agarwal

        Hi I also face the same problem while uploading my first web site, see if your program or webpage executes perfectly in offline mode then there are no problem with the code. This type of error occor mostly due to read write permission of the database, of it could the cause of cookies and caching and in this case try again after removing the cokkies and offline content from your system. With Regards Yogesh Agarwal

        M Offline
        M Offline
        matjame
        wrote on last edited by
        #3

        First thank you for the response, but unfortunately this site has to fun from my hosting company, so I cant test it offline.I have removed all the cached files and deleted the history, and still.Nothing happens. Is it possible that the hosting company could maybe check if their server grants access rights to my database??

        kagiso

        Y 1 Reply Last reply
        0
        • M matjame

          First thank you for the response, but unfortunately this site has to fun from my hosting company, so I cant test it offline.I have removed all the cached files and deleted the history, and still.Nothing happens. Is it possible that the hosting company could maybe check if their server grants access rights to my database??

          kagiso

          Y Offline
          Y Offline
          yogesh_kumar_agarwal
          wrote on last edited by
          #4

          This is possible but did you havn't the control panel details for the site you are developing?? And in your post you are tried to say that you have to write code then upload it on the server to check the effect of your code, you can't even use F5 option to debug for site. and if it is so then only the hosting company will help you. Yogesh

          M 1 Reply Last reply
          0
          • Y yogesh_kumar_agarwal

            This is possible but did you havn't the control panel details for the site you are developing?? And in your post you are tried to say that you have to write code then upload it on the server to check the effect of your code, you can't even use F5 option to debug for site. and if it is so then only the hosting company will help you. Yogesh

            M Offline
            M Offline
            matjame
            wrote on last edited by
            #5

            I have just contacted the service provider and they tell me that they will escalate the query.The problem is that, when I put in the wrong username and password, I get the right message (Make sure ur username and password are correct), but when I put in the right username and password, I get the error (Make sure the operation uses an updatable query).So it most definitely has to be permission issues. But they promised to call me back. Thanx again.

            kagiso

            1 Reply Last reply
            0
            • M matjame

              Hello guys. I have an update problem that with my logoncheck.asp and when I googled the problem I found out it might be permission problems on the database. Now I have tried to grant permission on the database folder properties to allow read/write, but I still get the same error. Is there another way I can use to maybe grant this permission.Unless there is something else Im doing wrong. The error is Error # -2147467259 Operation must use an updateable query. SQL = UPDATE tbl_employees SET lastlogin = #29-Feb-2008# WHERE employeelogin = 'SIPHOSIBUYANE' Code is : ]]> "" and request.Cookies("shark_password") <> "" and request.form("ccokie") <> "false" then strUserid = request.Cookies("shark_user_id") strPassword = request.Cookies("shark_password") boolFromCookie = True end if end if '----------------------------------------------------- '----------------------------------------------------- 'Level 1 Basic Validation Testing '----------------------------------------------------- '----------------------------------------------------- 'Test for Entry of Member ID prior to Running Search '----------------------------------------------------- if (strUserID="") then ' Member ID Entered session("msg") = "

              " & dictLanguage("Error_NoUserID") & "

              " Response.Redirect "default.asp?opt=1" 'Run Search '----------------------------------------------------- else 'Run Database Lookup sql = sql_GetEmployeesByLogin(strUserID) 'response.write sql & "
              " Set rs = Server.CreateObject("ADODB.RecordSet") rs.open sql, conn, 3, 3 end if '----------------------------------------------------- '----------------------------------------------------- 'Level 2 Validation Testing '----------------------------------------------------- '----------------------------------------------------- 'Member ID Entered Now Run Search for Record '------------------------------------------- If rs.eof Then 'No Record Found, Bad ID rs.close session("msg") = "

              "

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              It's the user account used for running the ASP.NET code that needs permission to the database file, usually the account IIS_WPG. Check also that the file is not simply write protected.

              Despite everything, the person most likely to be fooling you next is yourself.

              M 1 Reply Last reply
              0
              • G Guffa

                It's the user account used for running the ASP.NET code that needs permission to the database file, usually the account IIS_WPG. Check also that the file is not simply write protected.

                Despite everything, the person most likely to be fooling you next is yourself.

                M Offline
                M Offline
                matjame
                wrote on last edited by
                #7

                Well, I checked the database folder and I gave read/write permissions to my account but I still have the problem.Now I dont knw what to do. Im on asp by the way, not asp.net.

                kagiso

                G 1 Reply Last reply
                0
                • M matjame

                  Well, I checked the database folder and I gave read/write permissions to my account but I still have the problem.Now I dont knw what to do. Im on asp by the way, not asp.net.

                  kagiso

                  G Offline
                  G Offline
                  Guffa
                  wrote on last edited by
                  #8

                  The same thing applies to ASP; it's not your user account that is used to run the ASP code. Check the settings for the web site in IIS manager to find out what user account is used to run the application.

                  Despite everything, the person most likely to be fooling you next is yourself.

                  M 1 Reply Last reply
                  0
                  • G Guffa

                    The same thing applies to ASP; it's not your user account that is used to run the ASP code. Check the settings for the web site in IIS manager to find out what user account is used to run the application.

                    Despite everything, the person most likely to be fooling you next is yourself.

                    M Offline
                    M Offline
                    matjame
                    wrote on last edited by
                    #9

                    Well, IIS is not a problem.The site runs perfectly from IIS, but we just posted the site onto the new ISP FTP folder and its doing this.

                    kagiso

                    G 1 Reply Last reply
                    0
                    • M matjame

                      Well, IIS is not a problem.The site runs perfectly from IIS, but we just posted the site onto the new ISP FTP folder and its doing this.

                      kagiso

                      G Offline
                      G Offline
                      Guffa
                      wrote on last edited by
                      #10

                      Files that you upload to the ISP normally isn't writable by the account running the ASP code. An ISP that supports Access usually has a pre-created folder especially for database files, that has the appropriate security settings.

                      Despite everything, the person most likely to be fooling you next is yourself.

                      M 1 Reply Last reply
                      0
                      • G Guffa

                        Files that you upload to the ISP normally isn't writable by the account running the ASP code. An ISP that supports Access usually has a pre-created folder especially for database files, that has the appropriate security settings.

                        Despite everything, the person most likely to be fooling you next is yourself.

                        M Offline
                        M Offline
                        matjame
                        wrote on last edited by
                        #11

                        So, I have to put the database onto the folder?? I will try that and see if it dont work. Thanx, will let u knw.

                        kagiso

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups