File rights after SQLConfigDataSource
-
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
-
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
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. 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
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
-
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
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
-
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
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