I'm writing in VB2008 Express on Vista Home Premium and I'm trying programatically to delete a database file that is no longer needed. The code snippet is essentially:
Dim SQLconnect As New SQLite.SQLiteConnection()
SQLconnect.ConnectionString = "Data Source=" & dbname & ";"
SQLconnect.Close()
My.Computer.FileSystem.DeleteFile(dbname)
The program throws the "file in use by another process" exception when trying to execute the last line shown. 'dbname' is the proper complete path. Can anyone help me understand why this exception is being generated and what to do about it?
TIA...