Resolving Table Parameter Unspecified Issue

Jan 28th, 2014
Price: $30 USD

Question description

Hi, I am fairly close to finishing a task but I have a slight issue regarding table parameters being unspecified in my code. I am creating a web application that using a database.

This action in the controller aims to filter the results by the persons hair colour.

  /// POST: /Person/Search
  public ActionResult Search(PersonSearchViewModel viewModel)
  viewModel.HairColourViewModel = new HairColourViewModel
  HairColours = new SelectList(this.hairColourManager.GetHairColours(), "HairColour"),

  if (!this.ModelState.IsValid)
  return this.View(viewModel);

  viewModel.SearchResult = this.personManager.FindPeople(viewModel.SearchCriteria, 1234);

  return this.View(viewModel);

The procedure (database):

create procedure akk.GetPersonalDetails
  @Age int  = null,
  @Birthdate  date  = null,
  @HairColourCategory akk.IdTableType readonly  -- Optional list of Person ids to filter by. Passing none will be treated as if all were passed.

The table (database):

create type akk.IdTableType as table
  Category int

All steps work up until here work, but when I try to search for the person by their hair colour, I get the error "Table parameter is unspecified" .

If you could tell me what this means I would be very grateful.


Tutor Answer

(Top Tutor) Farrukh
School: University of Maryland

Studypool has helped 1,244,100 students

Review from student
" Outstanding Job!!!! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1828 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors