mr_rajesh86:SqlCommand cmd=new SqlCommand("Select Address,Mobile from Employee",con);
It’s probably because you’re missing a ‘where’ clause on the line above.
mr_rajesh86: SqlCommand cmd=new SqlCommand("Select Address,Mobile from Employee",con);
SqlDataAdapter da=new SalDataAdapter();
Dataset ds=new DataSet();
da.Fill(ds);
You're also not associating cmd with da so you need to say:
da.SelectCommand = cmd;
or initialise ds like so:
Dataset ds=new DataSet(cmd);