[关闭]
@rg070836rg 2015-08-16T15:07:56.000000Z 字数 872 阅读 1562

位图索引

data_structure

由于需求,需要我了解位图索引,这之前,我是第一次听说位图索引,

  1. using System.Configuration;
  2. using System.Data;
  3. using System.Data. 1 ;
  4. protected void ButtonOK_Click(object sender, EventArgs e){
  5. // 新建数据库连接,连接到SQL SERVER数据库
  6. System.Data.SqlClient.SqlConnection conn = new SqlConnection();
  7. conn.ConnectionString = ConfigurationManager.ConnectionStrings
  8. [“ (2) "].ConnectionString;
  9. SqlCommand cmd = new SqlCommand(); // 新建Command对象
  10. cmd.Connection = (3) ;
  11. cmd.CommandText="Insert into [Topic] ( [Title],[Content]) Values( (4) )";
  12. cmd.CommandType = CommandType.Text;
  13. // 添加查询参数对象,并给参数赋值
  14. cmd.SqlParameters.AddWithValue("@Title", (5) );
  15. cmd.SqlParameters.AddWithValue("@Content ", (6) );
  16. try {
  17. conn. (7) ; // 打开数据库连接
  18. cmd. (8) ; //将添加记录
  19. }
  20. catch (SqlException sqlException)
  21. { Response.Write(sqlException.Message); } // 显示连接异常信息
  22. finally {
  23. if (conn.State == ConnectionState.Open)
  24. conn. (9) ; //关闭连接
  25. }
  26. }
  27. protected void ButtonBack_Click(object sender, EventArgs e) {
  28. Response. (10) ("TopicList.aspx");
  29. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注