Connection.Close () will simply close the connection to the server as defined in the connection string. After this connection, the connection can be used / reopened.
Connection.Dispose() completely clear itself by deleting all unmanaged resources that prevent it from reusing the connection. When called, you should not try to use the object anymore. Inside Dispose(), Close () `all of this will certainly be called.
I would recommend using using syntax, if possible, to make sure things are cleaned correctly:
using(SqlLiteConnection conn = new SqlLiteConnection(...)) {
This will automatically delete the connection for you, no matter which exception is thrown.
Ian
source share