I have a stored procedure that has a bunch of input and output parameters because it is Inserting values to multiple tables. In some cases the stored proc only inserts to a single table (depending on the input parameters). Here is a mocked up scenario to illustrate.
Tables / Data Objects:
Person
Person.Id
Person.Name
Person.Address
Name
Name.Id
Name.FirstName
Name.LastName
Address
Address.Id
Address.Country
Address.City
Say I have a stored procedure that Inserts a Person. If the Address doesn't exist I won't add it to the Address table in the db. Thus when I generate the code to call the stored procedure I don't want to bother adding the Address parameters. For INPUT parameters this is ok because SQL allows me to supply default values. But for the OUTPUT parameter what do i do in the SQL Stored Procedure to make it optional so I do not recieve an error...
Procedure or function 'Person_InsertPerson' expects parameter '@AddressId', which was not supplied.