Try
Dim RS As ResultSet =
Do While
Loop
Catch
Log(LastException)
End Try
RS.close
Assuming that it is a local SQLite db then there is no real reason for an unexpected error to happen. If it is a remote db then you should use a pool and make sure to close the connection (which will close other resources as well).