DataSet ds = new DataSet();
DataRow dr = null;
DataTable dt01 = new DataTable();
dt01.TableName = "Test01";
dt01.Columns.AddRange(new DataColumn[] {
new DataColumn { ColumnName ="no", Caption = "일련번호", DataType=typeof(int), DefaultValue = 0}
, new DataColumn { ColumnName ="col", Caption = "컬럼명", DataType=typeof(string), DefaultValue = string.Empty}
, new DataColumn { ColumnName ="val", Caption = "값", DataType=typeof(string), DefaultValue = string.Empty}
, new DataColumn { ColumnName ="etc", Caption = "비고", DataType=typeof(string), DefaultValue = string.Empty}
});
dr = dt01.NewRow();
dr["no"] = 1;
dr["col"] = "COL1";
dr["val"] = "A";
dr["etc"] = "비고1";
dt01.Rows.Add(dr);
dr = dt01.NewRow();
dr["no"] = 2;
dr["col"] = "COL2";
dr["val"] = "B";
dt01.Rows.Add(dr);
dr = dt01.NewRow();
dr["no"] = 3;
dr["col"] = "COL3";
dr["val"] = "C";
dt01.Rows.Add(dr);
dr = dt01.NewRow();
dr["no"] = 4;
dr["col"] = "COL4";
dr["val"] = "D";
dt01.Rows.Add(dr);
dr = dt01.NewRow();
dr["no"] = 5;
dr["col"] = "COL5";
dr["val"] = "가";
dt01.Rows.Add(dr);
dr = dt01.NewRow();
dr["no"] = 6;
dr["col"] = "COL6";
dr["val"] = "나※";
dt01.Rows.Add(dr);
dr = dt01.NewRow();
dr["no"] = 7;
dr["col"] = "COL7";
dr["val"] = "~!@#$%^&*()_+`-={}[]:\";'<>?,./|\\";
dt01.Rows.Add(dr);
dr = dt01.NewRow();
dr["no"] = 8;
dr["col"] = "COL8";
dt01.Rows.Add(dr);
dr = dt01.NewRow();
dt01.Rows.Add(dr);
DataTable dt02 = new DataTable();
dt02.TableName = "Test02";
dt02.Columns.AddRange(new DataColumn[] {
new DataColumn { ColumnName ="no", Caption = "일련번호", DataType=typeof(int), AutoIncrement = true}
, new DataColumn { ColumnName ="etc", Caption = "비고", DataType=typeof(string), DefaultValue = string.Empty}
});
dr = dt02.NewRow();
dr["etc"] = "비고1";
dt02.Rows.Add(dr);
dr = dt02.NewRow();
dr["etc"] = "비고2";
dt02.Rows.Add(dr);
dr = dt02.NewRow();
dr["etc"] = "비고3";
dt02.Rows.Add(dr);
dr = dt02.NewRow();
dr["etc"] = "비고4";
dt02.Rows.Add(dr);
dr = dt02.NewRow();
dr["etc"] = "비고5";
dt02.Rows.Add(dr);
dr = dt02.NewRow();
dr["etc"] = "비고6";
dt02.Rows.Add(dr);
ds.Tables.Add(dt01);
ds.Tables.Add(dt02);