AccessにてADODB OLEDB ODBC

ODBCデータソースレス接続VBAサンプル
Access VBAでODBCデータソースレス接続
Sub Test()
    Dim Con As New ADODB.Connection
    Dim Rec As New ADODB.Recordset
    Con.ConnectionString = “Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Hoge\ABC.mdb;UID=admin;”
    Con.Open
    Rec.Open “社員”, Con
    Do Until Rec.EOF
        Debug.Print Rec(“氏名”)
        Rec.MoveNext
    Loop
End Sub
:OLEDB
adoCon.Open “Provider=SQLOLEDB;Data Source=(Server);InitialCatalog=(db);User ID=(User);Password=(Password)”
:ODBC
adoCon.Open “Provider=MSDASQL;Data Source=SQLSV;User ID=(User);Password=(Password)”
adoCon.Open “Driver={SQL Server};Data Source=SQLSV;User ID=(User);Password=(Password)”