We are trying to use Visual Basic 11 to connect to a test.mdf database file that was created by SQL Server Management Studio 2012 using the Server Name (localdb)\v11.0. The database and its tables look fine as displayed by SSMS.
Connection to the LocalDB database was attempted as follows:
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strSQL As String
cn.ConnectionString = "Server=(LocalDB)\v11.0;Integrated Security=true;AttachDBFileName=D:\SQLCompact\Test.mdf"
strSQL = "SELECT * from TableOne"
Try
rs.Open(strSQL, MainForm.cn, ADODB.CursorTypeEnum.adOpe ...
Go to the complete details ...