tAhIra sgd

tAhIra sgd

  • NA
  • 22
  • 15.6k

plz check errors

Apr 20 2011 3:02 PM
i ve make table in sql server and wanted to reterive one by one row in windows form... in case ov correct there must be inclement in score....... but question is not appaering in lable1 in windows form as well as options in radio buttons... plz plz help me out







private void Form1_Load(object sender, EventArgs e)
{
string constring ="Server=TAHIRA-7B0ECEAE\\SQLEXPRESS;integrated security=SSPI;database=MCQ";
SqlConnection conn = new SqlConnection (constring);
conn.Open();
string Sql = "select * from table_1";
SqlCommand cmd = new SqlCommand(Sql,conn);
SqlDataReader reader = cmd.ExecuteReader();
while(reader.Read());
label1.Text=reader[0];
radioButton1.Text=reader[1];
radioButton2.Text=reader[2];
radioButton3.Text=reader[3];
cmd.ExecuteNonQuery();

Answers (4)