Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code To Refresh Query Table | Excel Discussion (Misc queries) | |||
Excel 2000 required username and password login for database query | Setting up and Configuration of Excel | |||
ideas - Query table refresh | Excel Programming | |||
Web Query: Username and Password. | Excel Programming | |||
Timing of automatic query refresh and macro pivot table refresh | Excel Programming |