F
Frank Rizzo
I am using ADOX to make changes to an Access database that would be
difficult to do via the System.Data.OLEDBClient. So far I have no
trouble actually doing the work, however, I have trouble closing the
connection to the Access database.
//open connection
ADOX.CatalogClass connection = new ADOX.CatalogClass();
connection.let_ActiveConnection(this.ConnectionString);
//do the work
....
//close the connection
((ADODB.Connection) connection.ActiveConnection).Close();
Marshal.ReleaseComObject(connection);
Even though the code to close the connection does cause an error, it
doesn't actually close the connection, because if I try to connect to
the database later, it errors out saying that it is exclusively locked.
How do I actually close the connection created via ADOX?
Thanks
difficult to do via the System.Data.OLEDBClient. So far I have no
trouble actually doing the work, however, I have trouble closing the
connection to the Access database.
//open connection
ADOX.CatalogClass connection = new ADOX.CatalogClass();
connection.let_ActiveConnection(this.ConnectionString);
//do the work
....
//close the connection
((ADODB.Connection) connection.ActiveConnection).Close();
Marshal.ReleaseComObject(connection);
Even though the code to close the connection does cause an error, it
doesn't actually close the connection, because if I try to connect to
the database later, it errors out saying that it is exclusively locked.
How do I actually close the connection created via ADOX?
Thanks