I am having an issue this morning, I have been trying to call a stored procedure after inferring the schema, this all goes well and I am able to populate a variable with the IEnumerable.
The problems start here unfortunately, after populating the property, I would then try to pass that property to a dropdown's data. to display a column of that IEnumerable's information for the user to select.
I am actually populating a grid on that page too and another dropdown from separate stored procedures.
In this case, the stored procedure includes IF statements to jump from operation to operation.
DropdownIDInput: 0 will execute "Select dbo.tablename.Code From dbo.tablename"
DropdownIDInput: 1 will execute "Select dbo.OtherTableName.Name From dbo.OtherTableName"
DropdownIDInput: 2 will execute "Select dbo.OtherOtherTableName.LastName From dbo.OtherOtherTableName".
I am using a single stored procedure to populate multiple dropdowns with data, calling the stored procedure multiple times onload, each time with a different ID based off of the dropdown necessary.
Would my SQL select statements encapsulated inside of an IF/ELSE IF/ELSE be causing problems?