Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Switching ODBC sources in Excel 2007 | Excel Discussion (Misc queries) | |||
Excel Data Sources | Charts and Charting in Excel | |||
Connection to external data sources in Excel | Excel Discussion (Misc queries) | |||
Two Excel Data Sources | Excel Discussion (Misc queries) | |||
Pivot tables, external data sources and ODBC links | Excel Worksheet Functions |