日期:2014-05-17 浏览次数:20682 次
string connstr = ""; connstr = "数据库连接字符串"; SqlConnection conn = new SqlConnection(connstr); conn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandText = "create table t(a int)"; cmd.ExecuteNonQuery(); conn.Close();