DataAdapter: DataAdapter is Nothing but It is Bridge B/w the dataset and Database.
Befor going to dataadapter we need to follwing ;
1)Establish the Connection to database
2)Open Connection by Using Open method.
3)Fill the Dataadapetr.
Dataadpter load Genereated datd from Dataset Bu Using Fill() Method.
Ex:
Dataset ds = new Dataset();
datataadpter da = new Dataadapter("Select Query",Con);
da.Fill("Tablename",ds);
da.Fill(ds);//like
Interviews3 answers
Which method do you invoke on the DataAdapter control to load your generated dataset with data?
3 Answers
P NarasimhaPosted Mar 6, 2009, 7:10 PM EST
To load data in your dataset or datatable, you use "Fill" method which has different overloads such as:
Fill(DataSet dsObject) && Fill(DataTable dtObject)
Example:
SqlDataAdapter _adapter = new SqlDataAdapter();
DataSet ds = new DataSet();
//DataTable dt = new DataTable();
_adapter.Fill(ds);
//_adapter.Fill(dt);
Usama MosaadPosted Mar 3, 2009, 9:40 PM EST
To load data in your dataset or datatable, you use "Fill" method which has different overrides such as:
Fille(DataSet dsObject) && Fill(DataTable dtObject)
Example:
SqlDataAdapter _adapter = new SqlDataAdapter();
DataSet ds = new DataSet();
//DataTable dt = new DataTable();
_adapter.Fill(ds);
//_adapter.Fill(dt);
Usama MosaadPosted Mar 3, 2009, 7:52 PM EST


