hello,
I want to fetch all the records from database one by one when I click on next button
I have written this code for fetching the records from database.
But it shows only first record.
What code I have to written so that all the records can be fetch into textboxes.
SqlDataAdapter da = new SqlDataAdapter( "select * from detail",conn1);
DataSet ds = new DataSet();
da.Fill(ds);
txtname.Text =ds.Tables[0].Rows[0][0].ToString();
txtroll.Text =ds.Tables[0].Rows[0]["roll no"].ToString();
I want to fetch all the records from database one by one when I click on next button
I have written this code for fetching the records from database.
But it shows only first record.
What code I have to written so that all the records can be fetch into textboxes.
SqlDataAdapter da = new SqlDataAdapter( "select * from detail",conn1);
DataSet ds = new DataSet();
da.Fill(ds);
txtname.Text =ds.Tables[0].Rows[0][0].ToString();
txtroll.Text =ds.Tables[0].Rows[0]["roll no"].ToString();
Comment