Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default DAO issue : Data source name not found

Hi,

Need your help.

I have code that uses DAO to establish connection with SQL Server. While it
works without problem on many computers, on one computer it is giving me the
following error:

Err:-2147467257 Error:[Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified

I am using the following code

Public Function GetADOConnectionToIRT(ByRef c As Connection) As Boolean
Dim cTemp As ADODB.Connection
On Error GoTo ErrorInGetADOConnection
Set cTemp = New ADODB.Connection
cTemp.Open ConnectionStringToIRT()
Set c = cTemp
GetADOConnectionToIRT = True
Exit Function
ErrorInGetADOConnection:
MsgBox "Err:" & Err & " Description:" & Error & vbCrLf & "Could not
establish connection."
Exit Function
End Function

Public Function ConnectionStringToIRT() As String
ConnectionStringToIRT = "Provider=SQLOLEDB;Data
Source=<SomeName;UID=<SomeUserID;PWD=<SomePWD"
End Function

I suspected that one of the MDAC components was probably missing and hence I
reinstalled Microsoft Access 2003 on it but with no luck.

The connection string does not change from computer to computer and hence
that does not seem to be the problem since it works on other computers.

All computers are on a LAN and use Windows 2K and Excel 2003.


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
Links to a source not found hln247 Links and Linking in Excel 1 September 26th 08 03:32 PM
Data source name not found and no default driver specified robboll Excel Discussion (Misc queries) 0 July 22nd 08 03:32 AM
Data source name not found and no default driver specified Jan Excel Discussion (Misc queries) 0 November 26th 07 04:21 PM
Source not found Derek Dowle Links and Linking in Excel 0 July 27th 06 10:31 AM
Data Source Name Not Found Justin Tyme Excel Worksheet Functions 0 June 16th 05 11:45 PM


All times are GMT +1. The time now is 10:23 PM.

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"