Monday, February 18, 2008

Create a dataset Using Specified colum name and to data table C# code

DataSet dsTemp = new DataSet();
//dsTemp = null;
int recqty = 0;

DataTable dtAddNewItems = new DataTable();
DataColumn[] columns = {
new DataColumn("Product_No"),
new DataColumn("Qty_Received"),
new DataColumn("Certificates"),
new DataColumn("CertificateContentType"),
new DataColumn("TransportDamage"),
new DataColumn("PurrchaseQty"),
new DataColumn("Lot_No"),
new DataColumn("Qty_Returned")

};

dtAddNewItems.Columns.AddRange(columns);
dsTemp.Tables.Add(dtAddNewItems);

No comments: