Results 1 to 6 of 6

Thread: Database Read Only Access

  1. #1

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Question Database Read Only Access

    A separate division in our company is asking for 'read only access' to one of our databases. First of all I am not sure what that means. Second, I don't know what, if any, are the drawbacks to doing that.

    Any insights would be extremely helpful. Thanks.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,517

    Re: Database Read Only Access

    What type of DBMS? Since you posted this in VB .Net forum I guess you will be writing a program to interact with the database, so If you don't write to the database, then you have a read only system. but I'm sure you know that, so I'm not sure what your asking.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Database Read Only Access

    "Read-only access" means access to the data for reading purposes but no ability to write. For a database, that means your can execute a SELECT but not an INSERT, UPDATE or DELETE. That is something you can do at the server level when using systems like SQL Server but, in that case, it's really nothing to do with VB.NET. If your question actually does involve VB.NET then it's a case of writing an appropriate If statement to determine whether the current user has read-only or read/write access and allowing or disallowing specific functionality based on that.
    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

  4. #4

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Database Read Only Access

    Quote Originally Posted by jmcilhinney View Post
    "Read-only access" means access to the data for reading purposes but no ability to write. For a database, that means your can execute a SELECT but not an INSERT, UPDATE or DELETE. That is something you can do at the server level when using systems like SQL Server but, in that case, it's really nothing to do with VB.NET. If your question actually does involve VB.NET then it's a case of writing an appropriate If statement to determine whether the current user has read-only or read/write access and allowing or disallowing specific functionality based on that.
    Thanks. I have an API that provides access but for political reasons I hear things like, give me a read only connection string.

    I am looking for reasons to force the use of the API . All I have so far is that if I make a change to the DB I have to get permission from the outside group instead of just changing the API. One of the changes I was contemplating was the encryption of a string field. The API masks the change.

    I have no reason to trust this other group, a lot of bad history.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  5. #5
    Addicted Member
    Join Date
    Jul 2017
    Location
    Exeter, UK
    Posts
    186

    Re: Database Read Only Access

    I found this, it might help you out.

    https://stackoverflow.com/questions/...on-to-readonly

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Database Read Only Access

    The best way to grant read only is to add those users to create a role that has select only privileges and then add those users to that role. Then they can't do anything but select statements.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

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