I'm having trouble with releasing a connection to a MSAccess database.
eption: The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data.
Here's the Scenario:
My program's opening form uses an OleDb connection to an Access database, fills a dataset, then closes and disposes the connection.
Another form opens afterwards (Starting form remains open), and connects to the same database, fills a dataset, then closes and disposes the connection. (works fine)
...here's where the problem starts.
After the second form finishes and closes, if I try to open it up again, it throws the error above.
If I close the entire program and reopen it, then it works.
Code below shows how I fill the dataset.
Dim cn As New OleDb.OleDbConnection(Switchboard.PrmRtgConnString)
Dim da2 As New OleDb.OleDbDataAdapter("SELECT * FROM LocIDsNotUpdtd", cn)
Dim ds2 As New DataSet()
da2.FillSchema(ds2, SchemaType.Source, "LocIDsNotUpdtd")
Dim cmdBuilder2 As New OleDb.OleDbCommandBuilder(da2)