MyCommand.
string MyConn = "Data Source=XCFW;Initial Catalog=sbgl;User ID=sa";
SqlDataAdapter SelectAdapter = new SqlDataAdapter();
SqlConnection MyConnection = new SqlConnection(MyConn);
SqlCommand MyCommand = new SqlCommand(procname, MyConnection);
MyCommand.CommandType = CommandType.StoredProcedure;
MyCommand.Parameters.Add("@姓名",SqlDbType.Char,10);
MyCommand.Parameters["@姓名"].Value=@fields;
MyConnection.Open();
SelectAdapter.MissingSchemaAction=MissingSchemaAction.AddWithKey;
SelectAdapter.SelectCommand=myCommand;
MyConnection.Close();
DataTable dt=new DataTable();
SelectAdapter.Fill(dt);