4
Answers

Getting error of not having primary key

Rahul Patil

Rahul Patil

13y
2.1k
1

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)