G
Guest
I got handed a little project where a person left something hanging…
The code that is failing is
Dim adoConn2 As New ADODB.Connection
Dim RS2 As New ADODB.Recordset
Dim strConn2 As String
strConn2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
strConn2 = strConn2 & "Z:\Brian Zorzi\Student DB.mdb"
adoConn2.ConnectionString = strConn2
adoConn2.Open
RS2.Source = " SELECT * FROM IEF WHERE [Company Name] Like " & "'%" &
strCompany & "%'" & "ORDER BY email;"
RS2.CursorType = adOpenForwardOnly
RS2.ActiveConnection = adoConn2
RS2.Open
The problem is Z:\Brian Zorzi\Student DB.mdb does not exsist any more it is
an adp file now connecting to a server, lets call it “sqlserv1â€
So how do I change this code around to work with “sqlserv1�
Please help me I am not savy with this code at all if you need more code to
see what is going on let me know.
The code that is failing is
Dim adoConn2 As New ADODB.Connection
Dim RS2 As New ADODB.Recordset
Dim strConn2 As String
strConn2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
strConn2 = strConn2 & "Z:\Brian Zorzi\Student DB.mdb"
adoConn2.ConnectionString = strConn2
adoConn2.Open
RS2.Source = " SELECT * FROM IEF WHERE [Company Name] Like " & "'%" &
strCompany & "%'" & "ORDER BY email;"
RS2.CursorType = adOpenForwardOnly
RS2.ActiveConnection = adoConn2
RS2.Open
The problem is Z:\Brian Zorzi\Student DB.mdb does not exsist any more it is
an adp file now connecting to a server, lets call it “sqlserv1â€
So how do I change this code around to work with “sqlserv1�
Please help me I am not savy with this code at all if you need more code to
see what is going on let me know.