关于数据更新的问题
现有代码如下:
//创建学生信息表
DataSet ds = new DataSet();
DataTable dt = new DataTable("StudentInfo");
DataColumn col = new DataColumn("Stud_Number",typeof(int));
col.AllowDBNull = false;
col.AutoIncrement = true;
col.AutoIncrementSeed = 1;
col.AutoIncrementStep = 1;
dt.Columns.Add(col);
col = new DataColumn("Stud_Name",typeof(string));
col.AllowDBNull = false;
col.MaxLength = 10;
dt.Columns.Add(col);
col = new DataColumn("Stud_Sex",typeof(string));
col.AllowDBNull = false;
col.MaxLength = 2;
col.DefaultValue = "男";
dt.Columns.Add(col);
col = new DataColumn("Stud_Age",typeof(int));
col.AllowDBNull = true;
dt.Columns.Add(col);
dt.PrimaryKey = new DataColumn[]{dt.Columns["Stud_Number"]};
ds.Tables.Add(dt);
我如何把上面自己编写的表格更新到数据库中去,也就是说,如何在数据库中生成上面编写的表格。
急啊!100分。请教!