i have to show data in datagrid using store procedure...but remember...i m using store procure in seprate class so i m facing difficulties..
how to do it..
thats my class coding...
but how to pass it in main form?
public Searching()
{
Myconnection = new SqlConnection("Data Source=.;Initial Catalog=Bahria_Managment;Integrated Security=True");
}
public void Search_Student(int S_RegNo)
{
Myconnection.Open();
Mycommand = new SqlCommand("Search_Student",Myconnection);
MyDataAdapter = new SqlDataAdapter(Mycommand);
myDataSet = new DataSet();
MyDataAdapter.Fill(myDataSet);
regards..
Farhad..