I am using Visual Studio 2010. I am attempting to deploy an application that uses an *.accdb file. I understand that I can not install the accdb file into the c:\program files directory because that causes the accdb file to be read only. I also understand I need to either install the accdb file to the C:\Program Data or C:\Users\public directories. The question is how do I get the accdb file to install into a proper directory and also what does my app.config file need to show as far as a path to connect to it.
I was able to get the accdb file to install into the C:\program Data directory and was able to get the connection to work, but the accdb file was still read only.
I tried using the Special Folder - 'Commond Files Folder' but it didnt seem to install to any location. Plus the connection string did not work. i attempted to use the %public%\..........path.
So I would like to know what folder should i add and then what should the connection string be to get to that folder. and...will the same solution work on xp, vista, and 7 or do i need to create seperate install files?
any help is greatly appreciated.
- Moved by Bob_BaoMVP, Moderator Monday, January 31, 2011 7:42 AM (From:Application Compatibility for Windows Development)
According to the document: http://office.microsoft.com/en-us/access-help/deploy-an-access-2007-application-HA010218864.aspx .accdb has the most options to customize. So could you please ensure the property settings of the database file, do you set the "Readonly" for it. I do not think the property is related with target folder. However, you could try to deploy it by administrator account. Or try to create a Setup project of Visual Studio to deploy it. So in default, we could deploy the DB file in the same location with our application. This issue may be caused by other settings from Access file, I will help you to move it Access forum, it is probably your best resource on this.
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
From what I have read, it has nothing to do with the accdb file itself. I have created a Setup project in Visual Studio. That is how I am creating the msi file. This msi file is then what I use for installation. I have attempted on Vista and XP. It works on XP by default because if I install the accdb file to Program Files or Program Data folders it is not read only. Only in Vista does it appear to have an issue with making the accdb file read only.
I feel this thread has nothing to do with Access, but more to do with the Setup Project created in Visual Studio. I need to know what directory the accdb file should be installed into in the 'File System', and then what should be my connection path in the app.config file.
Ideally it would be nice to have it install into a public directory, but at this point, it doesnt really make a big difference for me.