To close my database I use this : SqlConnection.Close(); But my application is stuck in this method...
Each time I access the Database I do this :
string cmdSQL = "select min(shortAddress) from FreeShortAddress";
using (SqlCeCommand cmd = new SqlCeCommand(cmdSQL))
{
cmd.Connection = (SqlCeConnection)this.SqlConnection;
var r = cmd.ExecuteScalar();
}
Is it the right way ?How can you see which connection (on which table) is blocked ?
Thank you.
[Edit]Do you know a command to force closing all connections without being stuck ?