Data source name not found and no default driver specified

Tom Knowlton
Tom Knowlton used Ask the Experts™
on
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified




I get the error message above in the function call below:




Function fnGenHomebuyerList(strTempDate As String, strTempLenderFax As String, strTempLO As String) As String
    Dim db As New ADODB.Connection
    Dim recTemp As New ADODB.Recordset
       
    Dim intRecCount As Integer
    Dim strToField As String
    Dim strSubject As String
    Dim strFaxPath As String
    Dim fGoes As Boolean
    Dim strLOFaxDoc As String
    Dim strTempInText As String
    Dim strFaxRaw As String
    Dim strTempFieldName As String
    Dim FBoldSetting As Boolean
    Dim FItalicSetting As Boolean
    Dim FUnderlineSetting As Boolean
    Dim intFontSize As Integer
    Dim intBookmarkCount As Integer
    Dim strHomebuyerInfoLine As String
   
           
    recTemp.CursorLocation = adUseClient







    'ERROR MESSAGE WHEN THIS LINE RUNS
    db.Open "ODBC;DSN=Pipeline;Database=Pipeline"










   
    recTemp.Open "LOFaxSelect '" & strTempDate & "'", db, adOpenKeyset
   
    intRecCount = recTemp.RecordCount
   
    strHomebuyerInfoLine = "Homebuyer's Name=Neighborhood Gold Grant #=Tentative Closing Date" & Chr(10)
   
        If intRecCount > 0 Then
   
            Dim objWord1 As New Word.Application
   
            Do While recTemp.EOF = False
   
                strLOFaxDoc = "P:\Documents\fmLOFax.dot"
               
                If (Nz(recTemp("LenderFax"), "") = strTempLenderFax) And (Nz(recTemp("LO"), "") = strTempLO) Then
                    strHomebuyerInfoLine = strHomebuyerInfoLine & recTemp("HomeBuyer") & "=" & recTemp("entryID") & "=" & recTemp("tcd") & Chr(10)
                    fnAppendComment recTemp("entryID"), "LOFax", "LO fax sent"
                End If
                               
                DoEvents
               
                recTemp.MoveNext
           
            Loop
   
        End If
   
    recTemp.Close
   
    db.Close
   
    Set recTemp = Nothing
    Set db = Nothing
   
    fnGenHomebuyerList = strHomebuyerInfoLine

End Function
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Tom KnowltonWeb developer

Author

Commented:
Things we have checked so far:

1)  In the Access client we can open links to tables on SQL Server and can read the info just fine.

2)  We opened ODBC Data Sources.  The DSN called "Pipline" is a System DSN, and the TEST works just fine.  Spelling is correct on the DSN.

Commented:
Did you Register the Database. This will enter the connection information for an ODBC data source in the Windows Registry. The ODBC driver needs connection information when the ODBC data source is opened during a session.  Look up Register Database in MS Access Help.

Tom KnowltonWeb developer

Author

Commented:
We fixed the problem in the interim (since I posted the question)

The fix was to remove ODBC from the connection string.

From this:

 db.Open "ODBC;DSN=Pipeline;Database=Pipeline"

To this:

 db.Open "DSN=Pipeline;Database=Pipeline"



Go figure  :)

My thinking is ODBC should still be valid.

Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
Hi knowlton,

Please ask Community Support:
http://www.experts-exchange.com/Community_Support/
by means of a zero points Q to refund your points and to PAQ this question so others might benefit from your solution !

Thanks !

Nic;o)
Tom KnowltonWeb developer

Author

Commented:
Will do.

Thanks.
Commented:
As requested, points refunded and PAQ'd

modulo

Community Support Moderator
Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial