This code bombs out on the line that starts: SET rs =
strDriver = "SQL Server Native Client 11.0" cnn = "ODBC;DRIVER=" & strDriver & ";SERVER=" & ServerName _ & ";Trusted_Connection=Yes;APP=Microsoft Office 2003;WSID=" & ServerName _ & ";DATABASE=" & DBName & "; " Set db = CurrentDb Set qdf = db.CreateQueryDef("") qdf.Connect = cnn qdf.ReturnsRecords = True qdf.SQL = "SELECT top 1 dbo.SomeTableName. * from dbo.SomeTableName" Set rs = qdf.OpenRecordset() rs.Close
and create a new pass-through query with identical SQL string, it returns the 1 record I'm looking for, so the connection is valid, but I keep getting this error message.
ODBC;DRIVER=SQL Server Native Client 11.0;SERVER=ServerName;Trusted_Connection=Yes;APP=Microsoft Office 2003;WSID=ServerName;DATABASE=dbName;
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE