MySql.Data.MySqlClient.MySqlCommand.Close C# (CSharp) Method

Close() private method

private Close ( MySqlDataReader reader ) : void
reader MySqlDataReader
return void
        internal void Close(MySqlDataReader reader)
        {
            if (statement != null)
                statement.Close(reader);
            ResetSqlSelectLimit();
            if (statement != null && connection != null && connection.driver != null)
                connection.driver.CloseQuery(connection, statement.StatementId);
            ClearCommandTimer();
        }

Usage Example

コード例 #1
0
ファイル: index.aspx.cs プロジェクト: RoyalBob/Git
 protected void Page_Load(object sender, EventArgs e)
 {
     //准备用于发起请求的HttpWebRequest对象
     conn.Open();
     MySqlDataReader reader = new MySqlCommand("select * from files where publishdate='" + DateTime.Today.ToString("yyyy-MM-dd") + "'", conn).ExecuteReader();
     if (reader.HasRows)
     {
         reader.Close();
         conn.Close();
     }
     else
     {
         reader.Close();
         conn.Close();
         GetNews.getTencentNews(Url.TencentUrl, conn);
         GetNews.getAoyunNews(Url.AoyunUrl, conn);
         GetNews.getFenghuangNews(Url.FenghuangUrl, conn);
     }
 }
All Usage Examples Of MySql.Data.MySqlClient.MySqlCommand::Close