+ Reply to Thread
Results 1 to 4 of 4

Sharing worksheet with query through ODBC

  1. #1
    Registered User
    Join Date
    11-09-2006
    Location
    Kansas, USA
    MS-Off Ver
    2013
    Posts
    76

    Sharing worksheet with query through ODBC

    Hello,

    I need a little help here. I have a spreadsheet that pulls data from an sql database. Simple enough as long as I run it on my computer. I gave the query to another person to run along with a macro to update and format the data, but he needs the password to connect to the database. The problem is I dont want to give them the password to the whole database. So is there way to embed the password within the query, save it, or some other means of getting the data out with giving them access to everything?

    When I first start querying the database last summer I downloaded a free program that would let me query "a" table and save the password but it wouldn't let me relate/link tables and create the reports I need so I started using Excel which works well.... as long as it's on my computer.

    Thanks for reading

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Sharing worksheet with query through ODBC

    The correct approach would be to have limited-privilege user accounts created. Perhaps with read-only access to a subset of tables. Each user would then log-on and run your query.

    The next best would be to have a generic version of that kind of user account created (eg Mktg_User). Then embedding the password in the query would only allow the subset of tables to be used.

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    11-09-2006
    Location
    Kansas, USA
    MS-Off Ver
    2013
    Posts
    76
    That at least gives me some direction, Thank you

    So what you're saying is setup the query in on the sql server along with a user account so I can limit thier access?

    That a little more than I know how to do but maybe can just back everythign up and give it a whirl. Sounds like I need to get a SQL for Dummies Book rather htan trying to keep working it through excel.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Sharing worksheet with query through ODBC

    Actually, I was suggesting that you create a non-admin user with limited access privileges. I can't recall the commands. It's been a while since I worked with SQL Server. In Oracle it would be something like:

    Please Login or Register  to view this content.
    Then you can still run the SQL via Excel. When the Ron's username and password are entered....only myTable can be accessed.

    Does that help?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1