Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Accept & Use ODBC Login

How can I have a user enter login username & password to be used for multiple
ODBC connections? I have a workbook with multiple sheets, each with a DB
query. My macro steps thru each sheet, refreshing the data.
For each 'Selection.QueryTable.Refresh,' the user must re-enter id &
password. How can I modify this to have the user enter this info only once &
use it for each subsequent refresh?
--
Will
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Accept & Use ODBC Login

This can be hard coded into the QueryTable connection string. However
there are security and confidentiality implications.

Paul


"wpiet" wrote in message
...
How can I have a user enter login username & password to be used for
multiple
ODBC connections? I have a workbook with multiple sheets, each with a DB
query. My macro steps thru each sheet, refreshing the data.
For each 'Selection.QueryTable.Refresh,' the user must re-enter id &
password. How can I modify this to have the user enter this info only once
&
use it for each subsequent refresh?
--
Will



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Accept & Use ODBC Login

Sorry I hit the wromg button
For instance a connection string to an Access database, with individual user
and password login, will look like this

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet
OLEDB:System Database=system.mdw;User ID=myUsername;Password=myPassword;

Have a look on these links
http://www.connectionstrings.com/
http://www.sqlstrings.com/
http://www.dofactory.com/Connect/Connect.aspx

Paul

"Paul" wrote in message
...
This can be hard coded into the QueryTable connection string.
However there are security and confidentiality implications.

Paul


"wpiet" wrote in message
...
How can I have a user enter login username & password to be used for
multiple
ODBC connections? I have a workbook with multiple sheets, each with a DB
query. My macro steps thru each sheet, refreshing the data.
For each 'Selection.QueryTable.Refresh,' the user must re-enter id &
password. How can I modify this to have the user enter this info only
once &
use it for each subsequent refresh?
--
Will





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Accept & Use ODBC Login

Thanks, Paul. That is very helpful.
Sorry my post is repeated numerous times. Every time I tried to post, I got
an error saying the post was not received, so I'd try again a few hours
later. Now, I see they're all here.
--
Will


"Paul" wrote:

Sorry I hit the wromg button
For instance a connection string to an Access database, with individual user
and password login, will look like this

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet
OLEDB:System Database=system.mdw;User ID=myUsername;Password=myPassword;

Have a look on these links
http://www.connectionstrings.com/
http://www.sqlstrings.com/
http://www.dofactory.com/Connect/Connect.aspx

Paul

"Paul" wrote in message
...
This can be hard coded into the QueryTable connection string.
However there are security and confidentiality implications.

Paul


"wpiet" wrote in message
...
How can I have a user enter login username & password to be used for
multiple
ODBC connections? I have a workbook with multiple sheets, each with a DB
query. My macro steps thru each sheet, refreshing the data.
For each 'Selection.QueryTable.Refresh,' the user must re-enter id &
password. How can I modify this to have the user enter this info only
once &
use it for each subsequent refresh?
--
Will






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
ODBC Microsoft Access Driver Login Failed Sue[_2_] Excel Discussion (Misc queries) 1 October 10th 08 08:09 AM
Suppressing ODBC Login Prompt Fid[_2_] Excel Programming 2 December 3rd 07 01:43 AM
ODBC Microsoft Access Driver Login Failed BARRIOSWJ Excel Worksheet Functions 0 March 6th 07 10:20 PM
Q:Excel/ODBC/Login .... MSweetG222 Excel Discussion (Misc queries) 1 July 24th 05 06:37 PM
Q:Excel/ODBC/Login .... MSweetG222 Excel Programming 1 July 24th 05 06:37 PM


All times are GMT +1. The time now is 02:07 AM.

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

About Us

"It's about Microsoft Excel"