Today i will explain how to pick data from DataSet using C#.NET.
In the Previous articles i explained how to close form on click of the button using C#.net, how to insert record into database from listview control using C#.net, how to backup and restore access database using c#.net, how to backup and restore access database using c#.net, how to fill dataset using c#.net and many more about C#.Net.
Below is the Code For Filling Dataset
OleDbConnection con = new OleDbConnection("YourConnectionString");
OleDbDataAdapter da = new OleDbDataAdapter("select * from table1", con);
DataSet ds = new DataSet();
Create DataSet object.
And Fill DataSet using Fill Function. Pass DataSet object as parameter in Fill Function.
Now Next question is how to pick record from DataSet? You can use the Below code :
Here we are picking title column from table which is on index no. 1.