Saturday, February 20, 2010

Data Reading method in C# using DataRow

MySqlDataAdapter adp = new MySqlDataAdapter("select * from lim", cn);
DataSet ds = new DataSet();
adp.Fill(ds);
DataRow dr = ds.Tables[0].Rows[0];
DataRow dr1 = ds.Tables[0].Rows[1];
DataRow dr2 = ds.Tables[0].Rows[2];

radioButton1.Text = dr.ItemArray.GetValue(0).ToString();
radioButton2.Text = dr1.ItemArray.GetValue(0).ToString();
radioButton3.Text = dr2.ItemArray.GetValue(0).ToString();

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...