I have a datareader that is getting results from my stored procedure. The stored procedure depending on certain values such as ("ismarried" = true) returns 10 coulmns but if ("ismarried" = false) it returns only 5 columns.
In my asp.net page my datareader is expecting 10 columns no matter what and wanted to know if there was a way in my asp.net c# code to have optional parameters. I do know you can use ISNULL("Column", '') in SQL but instead of doing that i was hoping there was a way to maybe tell my datareader that these 5 parameters might not always exist.
Thanks