Results 1 to 4 of 4

Thread: [2005] Shared Access Database

  1. #1

    Thread Starter
    Hyperactive Member cptHotkeys's Avatar
    Join Date
    Apr 2007
    Location
    New Zealand
    Posts
    294

    [2005] Shared Access Database

    Hi people,

    I am developing a POS/Credit/Stock Control system that is going to be based on a MS Access database. This database needs to be shared, there will be no more that 3 computers with access to this DB, now what I would like some advice with is.
    1) Are there any issues other than read/write permisions (meaning, if the current user has access to the database file on the server, will that be all i need to worry about)
    2) I would like to inform the user of permission errors, so how can I detect user permissions for a given file on the server, or another workstation?
    3) Will "IO.File.Exists(path)" work over a LAN?
    4) Can I use the UNC Path for the file and treat it like a local file?

    Sorry for asking such basic questions, its just that I have no access to a network where I can test this, so when I get the chance(which will probably be onsite) I would like to be as prepared as possible...

    Thanks in advance...

    (I have been missing from this site for a while, as I have no internet at my new house, And if anyone was wondering, I havent forgotten about that skinning tutorial I said I would post, infact, I have already made some skins, just been a bit busy with study ect to finish it up)

    Signatures suck

  2. #2
    Frenzied Member circuits2's Avatar
    Join Date
    Sep 2006
    Location
    Kansas City, MO
    Posts
    1,027

    Re: [2005] Shared Access Database

    Quote Originally Posted by cptHotkeys
    1) Are there any issues other than read/write permisions (meaning, if the current user has access to the database file on the server, will that be all i need to worry about)
    As far as the database is concerned, the only permissions you need are those that would allow connectivity to the file location. You will have to take into consideration any type of authentication that you have set up in the access database such as users etc.

    Quote Originally Posted by cptHotkeys
    2) I would like to inform the user of permission errors, so how can I detect user permissions for a given file on the server, or another workstation?
    Use a simple Try/Catch Block and catch the permission exceptions. I'm not sure exactly how many there are but you can use intellisense to pick them out.

    Quote Originally Posted by cptHotkeys
    3) Will "IO.File.Exists(path)" work over a LAN?
    Yes, that will work over a LAN.

    Quote Originally Posted by cptHotkeys
    4) Can I use the UNC Path for the file and treat it like a local file?
    All of my Access DB apps use a database that is kept on a file server and I always use the UNC path to locate the files. It just seems much cleaner that way because IP addresses seem to be changed more often than server and directory names. However, if you are saving your connection strings in the App.Config file, then simple XML editing can update your connection string in the event that some parameter is changed.


    Hope this helps.
    Show the love! Click (rate this post) under my name if I was helpful.

    My CodeBank Submissions: How to create a User Control | Move a form between Multiple Monitors (Screens) | Remove the MDI Client Border | Using Report Viewer with Visual Studio 2012 Express

  3. #3

    Thread Starter
    Hyperactive Member cptHotkeys's Avatar
    Join Date
    Apr 2007
    Location
    New Zealand
    Posts
    294

    Re: [2005] Shared Access Database

    Thanks, that helped allot...
    One more question...
    Quote Originally Posted by circuits2
    As far as the database is concerned, the only permissions you need are those that would allow connectivity to the file location. You will have to take into consideration any type of authentication that you have set up in the access database such as users etc.
    So for connectivity do you mean "Read" permisions, and I am guessing here, but to execute an INSERT statement for example, can I do that with read permisions and the Jet engine will handle the insertion of the data regardless of wether or not the user has write permisions, or will I still need write permissions to insert data...

    Thanks again....

    Signatures suck

  4. #4
    Frenzied Member circuits2's Avatar
    Join Date
    Sep 2006
    Location
    Kansas City, MO
    Posts
    1,027

    Re: [2005] Shared Access Database

    You will need write permissions as well to execute INSERT and UPDATE statements because you are changing the contents of the file.
    Show the love! Click (rate this post) under my name if I was helpful.

    My CodeBank Submissions: How to create a User Control | Move a form between Multiple Monitors (Screens) | Remove the MDI Client Border | Using Report Viewer with Visual Studio 2012 Express

Posting Permissions

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



Click Here to Expand Forum to Full Width