Like this should work...
Left out the connection function in my example, but that of course does not make a difference, I guess you see the point anyway . =)Code:Dim gconDatabase As New OleDbConnection() Dim gcDatabasePath As String = "D:\test.mdb" Dim gcDatabasePassword As String = "pass" gconDatabase.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & gcDatabasePath & ";" & _ "Persist Security Info=False;" & _ "Jet OLEDB:Database Password=" & gcDatabasePassword & ";" gconDatabase.Open() gconDatabase.Close()




Reply With Quote