PC Review


Reply
Thread Tools Rate Thread

DAO issue : Data source name not found

 
 
=?Utf-8?B?QWxvaw==?=
Guest
Posts: n/a
 
      12th Oct 2006
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data source name not found =?Utf-8?B?Y2luZHk=?= Microsoft Excel Crashes 1 3rd Oct 2005 11:03 PM
Data source name not found =?Utf-8?B?Z2NvdHRlcmw=?= Microsoft Windows 2000 5 20th Aug 2005 07:10 PM
Data Source Name Not Found =?Utf-8?B?SnVzdGluIFR5bWU=?= Microsoft Excel Worksheet Functions 0 16th Jun 2005 11:45 PM
Data source name not found LordMerlin Microsoft Dot NET 1 14th Mar 2004 10:46 PM
Re: ERROR: Data source name not found... Please help... George Ter-Saakov Microsoft ASP .NET 0 26th Jun 2003 07:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:42 PM.