+ Reply to Thread
Results 1 to 3 of 3

refresh Query table using own password for each username

  1. #1
    Registered User
    Join Date
    02-06-2006
    Posts
    1

    refresh Query table using own password for each username

    Please help me. I have many query table using data source : ODBC and driver : Oracle. I want to refresh the table using own password for each username. How to add my macro for doing that?
    It's my macro :
    Please Login or Register  to view this content.
    thanks very much.

  2. #2
    K Dales
    Guest

    RE: refresh Query table using own password for each username

    If you set the querytable properties (right-click on the query data range and
    choose "Properties...") you can tell it to remember the password. Or, you
    can have your macro edit the QueryTable.Connection property, which has the
    connection string; this normally contains the user ID (UID) and password
    (PWD); however be advised that with either of these approaches anyone with a
    knowledge of VBA could potentially discover your user id and password by
    examining the connection string. If security is an issue you should perhaps
    set up a different account on the database giving access to only the queries
    you need your users to run and use that account rather than your own!
    --
    - K Dales


    "kuh" wrote:

    >
    > Please help me. I have many query table using data source : ODBC and
    > driver : Oracle. I want to refresh the table using own password for
    > each username. How to add my macro for doing that?
    > It's my macro :
    >
    > Code:
    > --------------------
    > Sub refresh1()
    > With Sheets("Data").Range("B5")
    > .QueryTable.Refresh BackgroundQuery:=False
    > End With
    > End Sub
    > --------------------
    >
    >
    > thanks very much.
    >
    >
    > --
    > kuh
    > ------------------------------------------------------------------------
    > kuh's Profile: http://www.excelforum.com/member.php...o&userid=31224
    > View this thread: http://www.excelforum.com/showthread...hreadid=508948
    >
    >


  3. #3
    Rob van Gelder
    Guest

    Re: refresh Query table using own password for each username

    Instead of configuring an ODBC connection on the Machine tab try configuring
    an ODBC connection on the User tab.

    If you are using Oracle integrated security, then the username is a
    forward-slash.

    While experimenting, you may find my Query Editor add-in useful - available
    on my website.

    --
    Rob van Gelder - http://www.vangelder.co.nz/


    "kuh" <kuh.22tedb_1139241010.764@excelforum-nospam.com> wrote in message
    news:kuh.22tedb_1139241010.764@excelforum-nospam.com...
    >
    > Please help me. I have many query table using data source : ODBC and
    > driver : Oracle. I want to refresh the table using own password for
    > each username. How to add my macro for doing that?
    > It's my macro :
    >
    > Code:
    > --------------------
    > Sub refresh1()
    > With Sheets("Data").Range("B5")
    > .QueryTable.Refresh BackgroundQuery:=False
    > End With
    > End Sub
    > --------------------
    >
    >
    > thanks very much.
    >
    >
    > --
    > kuh
    > ------------------------------------------------------------------------
    > kuh's Profile:
    > http://www.excelforum.com/member.php...o&userid=31224
    > View this thread: http://www.excelforum.com/showthread...hreadid=508948
    >




+ 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