Untyped dataSet you can created in following manner by creating object of DataSet Class.
Dataset has one table with column name firstName.
DataSet ds = new DataSet();
DataTable dt = new DataTable();
DataColumn one = new DataColumn("FirstName");
dt.Columns.Add(one);
ds.Tables.Add(dt);
You can add typed dataset by following manner,
On Solution Explorer, RightClick -> Add New Item then select DataSet.xsd after that from server explorer you can drag the object or you can manuall also create table. and give "Select Command, InsertCommand , UpdateCommand and DeleteCommand", when you call the method, DataSet.AcceptChanges(); , respective command will be executed based on the Rowstate.
No comments:
Post a Comment