Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
kuh kuh is offline
external usenet poster
 
Posts: 1
Default 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 :

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default 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" 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code To Refresh Query Table Carl Excel Discussion (Misc queries) 0 December 8th 06 01:23 AM
Excel 2000 required username and password login for database query ISTech Setting up and Configuration of Excel 0 September 7th 05 01:11 AM
ideas - Query table refresh MattShoreson[_34_] Excel Programming 4 July 6th 05 11:27 AM
Web Query: Username and Password. Sharad Naik Excel Programming 0 December 16th 04 09:43 AM
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"