Connection String Not Working

I am new to SQL Connection strings. We recently migrated from SQL Server 2008 32 bit to SQL Server 2017 64 bit. The database I am using is an Access 2010 32 bit and we upgraded to Access 2013 32 bit. I believe the connection string that was being used for SQL Server 2008 32 bit was
Sub CheckDBName()
Dim m As String
Dim i As Integer
Dim i2 As Integer

On Error Resume Next
m = CurrentProject.Connection.ConnectionString
i = InStr(m, "Initial Catalog=")
i2 = InStr(m, ";Data Provider=")
m = Mid(CurrentProject.Connection.ConnectionString, (i + 16), (i2 - (i + 16)))

It no longer works and I really don't know how to interpret it. I am assuming that a 32 bit front end won't connect to 64 bit back end either. Can someone please help?

0 answers