troubleshooting Question

ADO Connection issue

Avatar of Ronald popo
Ronald popo asked on
DatabasesMicrosoft WordSQL
7 Comments1 Solution81 ViewsLast Modified:
Hi everyone,
I have a word template that merges data from a sql DB.  I did not write it.  The server crashed and a new server was installed.  I am having a connection problem.  It is a template that was written prior to 2005.

This is part of the code concerning the connection

Public drive As New ADODB.Connection
Public cmd As New ADODB.Command
Public DOTainCntFlag As String

in addition:

Public Sub GetLPMain()
On Error GoTo Err_GetLDriving
Dim sqlstring As String
Dim lpmrs As New ADODB.Recordset
'
' Connects to database and gets Driversrecord
'

Customer_num = [custNumber]

' Set ADO connection
drive.Open "DSN=myserver-new-year\Drivers;uid=workers;pwd=checking;database=Driving"
Set cmd.ActiveConnection = drive

I'm getting the following error.  I've googled it and still the same

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros