1
これは私のクラスコードです。 _return()プロシージャからデータセットを返したい これをプロシージャを呼び出した別のフォームに戻したいとします。 返品の種類は何ですか?それを実装する方法は?C#.netでデータセットを返す方法
public class Class1
{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS2005;AttachDbFilename='C:\Users\krish\Documents\Visual Studio 2005\WebSites\TRS\App_Data\Database.mdf';Integrated Security=True;User Instance=True");
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da = new SqlDataAdapter();
DataSet ds = new DataSet();
public void _return(String qry)
{
con.Open();
da = new SqlDataAdapter(qry, con);
da.Fill(ds, "details");
con.Close();
}
}