dcsimg
Results 1 to 10 of 10

Thread: Access Database file Read only

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2018
    Posts
    15

    Access Database file Read only

    Hi,
    Hopefully I am in the right forum, I am using VS 17 and have packaged a project which uses an Access database file, the only part of my packaged program that is not working when I install it is the database part, I have narrowed the problem to the database file getting installed as read only, how do I make sure that the database file can be altered? Do I have to do it via code in the Project or is it a simple case of altering one of the properties?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    100,317

    Re: Access Database file Read only

    This is probably more of a deployment question so I've notified the mods and they may choose to move the thread.

    How EXACTLY are you deploying the application? Are you using ClickOnce? The Setup project extension? Something else?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2018
    Posts
    15

    Re: Access Database file Read only

    Hi,
    I am using VS Installer Projects extension

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    32,595

    Re: Access Database file Read only

    At this point, this does sound like a deployment question, so I moved the thread in hopes that this forum will provide more on-point answers. I can say that I have not had this issue with the one time I deployed an Access DB with a project, but considering the sample size, I don't think my experience means a thing.
    My usual boring signature: Nothing

  5. #5
    Frenzied Member
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    1,191

    Re: Access Database file Read only

    What folder location are you installing the database file to?

  6. #6

    Thread Starter
    New Member
    Join Date
    Apr 2018
    Posts
    15

    Re: Access Database file Read only

    Hi,
    I have narrowed it down to the folder that the program is installed to which is Programs Files (x86) and now understand why it is a read only folder, The problem now is I am trying to get Visual Studio Installer Projects (Extension) to install the Access database file into a non read only folder so it can be added to or updated, any help would be appreciated

  7. #7
    Frenzied Member
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    1,191

    Re: Access Database file Read only

    See the link below for posts (#3) about where you should be storing the database file:

    http://www.vbforums.com/showthread.p...path-is-denied

  8. #8

    Thread Starter
    New Member
    Join Date
    Apr 2018
    Posts
    15

    Re: Access Database file Read only

    I have added a folder to the setup which installs the Database file in a folder in My Documents and still have a problem, If I install the full package in My Documents it works fine but if I install the data file by itself in My documents (which is not read only) and install the rest of the program in Program Files (X86) it will not work, do I have to alter any of the Database File properties in order for the program to communicate with it ?

  9. #9
    Frenzied Member
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    1,191

    Re: Access Database file Read only

    You need to make sure your program is looking for the database in the folder you create in (My) Documents. It is probably currently set to use the same location where the program is installed (default). Also, you should probably not be hard-coding the database folder location, since Microsoft may again change path names. Think about storing the database path location somewhere, like a configuration file or registry entry, that can be changed without re-compiling the program.

  10. #10

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width