Public Function OpenOLEDBConn(ByVal DB_PATH1 As String) As OleDbConnection Dim ConStr1 As String ConStr1 = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source=" & DB_PATH1 & ";Jet OLEDB:Database Password=" & UserPAssword & ";" On Error GoTo ErrTrap Dim AdConn1 As New OleDb.OleDbConnection(ConStr1) AdConn1.Open() Return (AdConn1) Exit Function ErrTrap: MsgBox(Err.Description, vbCritical) End End Function
Microsoft Jet OLE DB 4.0
Microsoft ACE OLEDB 12.0
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)