LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel VBA & ODBC Data Sources

I've built an excel application that I need to share with many people
within the company, problem is almost none of them have the
non-standard data source defined on their PC, and, seeing as this uses
a service account to access a SQL Server, it would be better that they
not have this data source defined in case they need to access that
server using their own user id... Here is my connection string in VBA:

ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=aProduction SQLServer -
9;UID=*ServiceAccount*;PWD=*ServiceAccountPasswd*; APP=Microsoft Office
XP;WSID=SYS9962;DATABASE=QDB;Network=DBMSSOCN" _
, Destination:=Range("A1"))

This connection string includes the username and password used for the
connection, it does not include the hostname of the sql server, but
instead, the datasouce name, that is what i'm interested in changing...
Is there any chance I can bypass ODBC when connecting to SQL Server
from excel? or anyway i can, from within VBA, create and drop data
sources on the fly?

Thanks for your time,

-Tim

 
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
Switching ODBC sources in Excel 2007 MichaelS Excel Discussion (Misc queries) 1 December 30th 09 12:51 AM
Excel Data Sources KnockOffNigel Charts and Charting in Excel 1 December 29th 08 10:48 AM
Connection to external data sources in Excel Thomas Wellington Excel Discussion (Misc queries) 0 March 1st 07 05:44 PM
Two Excel Data Sources Stephanie Excel Discussion (Misc queries) 1 February 5th 07 02:07 PM
Pivot tables, external data sources and ODBC links plato Excel Worksheet Functions 0 January 17th 05 05:07 PM


All times are GMT +1. The time now is 08:09 AM.

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"