>public DataSet GetMyData() >{ > // I wouldn't actually hard-code the connection string here, it should be in your config settings > string TestConnection = "server=(local);database=MyDataBase;uid=sa;pwd=MyPassword"; > SqlConnection MyConnection = new SqlConnection(TestConnection); > > SqlCommand sc = new SqlCommand("MyStoredProc", MyConnection); > sc.CommandType = CommandType.StoredProcedure; > SqlDataAdapter da = new SqlDataAdapter(sc); > > DataSet ds = new DataSet(); > da.Fill(ds); > > return ds; >} >>