摘要:
刚开始学数据库连接。。。一步一步来。。。using (SqlConnection conn = new SqlConnection("Data Source = .; Initial Catalog = 数据库名; User Id = sa; Password = 123456;")) //连接数据库{ conn.open(); //打开数据库 using(SqlCommand cmd = conn.CreateCommand()) //创建数据库命令对象 { cmd.CommandText = "select * from MyLo... 阅读全文