Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default connecting to sql database from excel using file dsn

in the past I have set up a machine dsn using Access then used the following
connection statements in excel vba to access the data.

Set wrkODBC = CreateWorkspace("", "admin", "", dbUseODBC)
Set Connection1 = wrkODBC.OpenConnection("Connection1",
dbDriverNoPrompt, , "ODBC;Uid=username;Pwd=password;DSN=dsnname")

it always worked great. Now I want to use a file dsn so any user can use
the excel file on a server that everyone has access to. I set up the file
dsn on the server at X:\foldername\dsnfilename.dsn . I'm wondering how I
have to alter my code to use this file dsn.... thanks in advance....

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
connecting database curopting excel Andre Kruger Excel Programming 0 August 4th 06 01:38 PM
Connecting to a database cmpcwil2[_20_] Excel Programming 1 May 30th 06 01:56 PM
Connecting To a Excel Database NOODLES101487 Excel Programming 1 October 14th 05 02:26 PM
Connecting to External Database Geert Excel Programming 1 January 10th 05 04:46 PM
Excel Connecting to SQL Server Database - Need your Help Rajesh G Excel Programming 2 February 27th 04 08:01 PM


All times are GMT +1. The time now is 06:38 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"