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. General Programming
  3. C / C++ / MFC
  4. File rights after SQLConfigDataSource

File rights after SQLConfigDataSource

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasejsontutorialquestion
5 Posts 2 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.
  • S Offline
    S Offline
    S Becker
    wrote on last edited by
    #1

    Hello together, i have got a MFC application that uses an MS Access database over ODBC. When my application starts it compresses the database by calling SQLConfigDataSource API function. After this call the rights for my mdb file changed. The 'User' group is removed. Only an administrator, the system and myself can use the file from now on. Other users without admin rights can't use my application anymore. Has anybody an idea how to stop SQLConfigDataSource from changing the file rights? Regards Sascha

    D 1 Reply Last reply
    0
    • S S Becker

      Hello together, i have got a MFC application that uses an MS Access database over ODBC. When my application starts it compresses the database by calling SQLConfigDataSource API function. After this call the rights for my mdb file changed. The 'User' group is removed. Only an administrator, the system and myself can use the file from now on. Other users without admin rights can't use my application anymore. Has anybody an idea how to stop SQLConfigDataSource from changing the file rights? Regards Sascha

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      S. Becker wrote:

      ...it compresses the database by calling SQLConfigDataSource API function.

      How are you calling it?

      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      S 1 Reply Last reply
      0
      • D David Crow

        S. Becker wrote:

        ...it compresses the database by calling SQLConfigDataSource API function.

        How are you calling it?

        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        S Offline
        S Offline
        S Becker
        wrote on last edited by
        #3

        CString sDriver = _T("Microsoft Access Driver (*.mdb)"); CString sAttributes = _T("COMPACT_DB=") + m_sTargetDB + _T(" ") + m_sTargetDB + _T(" General"); int retcode = ::SQLConfigDataSource(AfxGetMainWnd()->m_hWnd, ODBC_ADD_DSN, sDriver, sAttributes); Regards Sascha

        D 1 Reply Last reply
        0
        • S S Becker

          CString sDriver = _T("Microsoft Access Driver (*.mdb)"); CString sAttributes = _T("COMPACT_DB=") + m_sTargetDB + _T(" ") + m_sTargetDB + _T(" General"); int retcode = ::SQLConfigDataSource(AfxGetMainWnd()->m_hWnd, ODBC_ADD_DSN, sDriver, sAttributes); Regards Sascha

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          This looks okay. When the compacting is done, can you add the Users group back to the file's ACL?

          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          S 1 Reply Last reply
          0
          • D David Crow

            This looks okay. When the compacting is done, can you add the Users group back to the file's ACL?

            "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            S Offline
            S Offline
            S Becker
            wrote on last edited by
            #5

            I never had to implement security functions before and it looked very difficult. This morning i was very happy to find a mail of a colleague that showed me where to find a function in our source base that exactly does that. My problem is solved. Thanks you for your help. Regards Sascha

            modified on Tuesday, February 12, 2008 5:12 AM

            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