Rahul Patil

Rahul Patil

  • NA
  • 17
  • 38.2k

Getting error of not having primary key

Apr 19 2011 4:33 AM

I am searching student id from table sid as primary key still i have error no primary key in your table

Int sid=int.parse(interaction.inputBox("Enter id );

Datarow dr=ds.tables[0].Rows.Find(sid);

If(dr!=null)

{

Textbox1.text=dr[0].ToString();//taking student name here


}

else

MessageBox.Show("  id not found");}


Answers (4)