Resolving Table Parameter Unspecified Issue

User Generated

xvzoreyrl

Programming

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
  [HttpPost]
  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.

Thankyou








User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Similar Content

Related Tags