摘要: 刚开始学数据库连接。。。一步一步来。。。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... 阅读全文
posted @ 2013-02-18 16:28 步子521 阅读(171) 评论(0) 推荐(0) 编辑