I'm having troubles with this piece of code.
I need to open my connection after clicking a button to add something to a database.
This goes fine for the first 2 times you try, the 3rd try will not open the database anymore.
Which causes a failure of the program I made.
I get an error on cnn.Open() that says OleDvException was unhandeled : unspecified error
Any help please...
Sub subOpenConnection() 'MessageBox.Show("subopenconnection") Dim strConn As String = ("Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source = '" & fntPath() & "'") cnn = New OleDbConnection(strConn) If cnn.State = ConnectionState.Closed Then cnn.Open() End Sub