title: Correct use of Try Catch for the SQL connection in C#
body: <p>Is this code correct in means of Try/Catch? I need to value whether the action is done or not to inform the user about the result, so I will then get the bool value to know if connection was successful.</p>
  
  <pre><code>    public static bool CreateSQLDatabaseTable()
      {
          var connString = "Server=localhost\\SQLEXPRESS;Integrated Security = SSPI; database = MyDB";
          string cmdText = "SELECT count(*) as Exist from INFORMATION_SCHEMA.TABLES where table_name =@Product";
          try
          {
              using (var sqlConnection = new SqlConnection(connString))
              {
                  using (var sqlCmd = new SqlCommand(cmdText, sqlConnection))
                  {
                      sqlCmd.Parameters.Add("@Product", System.Data.SqlDbType.NVarChar).Value = "Product";
                      sqlConnection.Open();
                      sqlCmd.ExecuteScalar();
                      if ((int)sqlCmd.ExecuteScalar() != 1)
                      {
                          using (SqlCommand command = new SqlCommand("CREATE TABLE Product (Id INT, UserId TEXT, CreationDate TEXT, Name TEXT)", sqlConnection))
                          {
                              command.ExecuteNonQuery();
                              return true;
                          }
                      }
                  }
  
              }
              return false;
          }
          catch
          {
              return false;
          }
      }
  </code></pre>