ADO.NET操作数据库的写法
1 /// public void Student(Student sd) 4 { 5 List<SqlParameter> sqlList = new List<SqlParameter>(); 6 sqlList.Clear(); 7 Hashtable ht = new Hashtable(); 8 string fields = ""; 9 //姓名 10 fields+="name=@name"; 11 sqlList.Add(new SqlParameter("@name","sd.Name")) ; 12 //年龄 13 fields+=",age=@age"; 14 sqlList.Add(new SqlParameter(""))
} 1