A colleague of mine is working on a .NET application. He needs to write his save function for his object.
Normally he would use a stored procedure in SQL Server to do this, but with 40 columns that is quite a task.
Several of our other colleagues have preferred using XSD’s for their database interaction.
What is going to give the best effort, maintainability and efficiency trade off when dealing with large records?
This is one of those questions that doesn’t really have an answer.
It depends on what you are trying to achive at the time.
I would usually use a Stored Procedure on the basis that I can write fewer lines of code and also I can tweak the Stored Procedure without rebuilding or redeploying anything. If I need to add new fields then extra code is obviously required.
If speed then becomes an issue I can explore more complex solutions.
I like the suggestion that Brendan makes of using XML however I think we might be doing a lot of work just to avoid creating too many parameters. I can see this would be a very good way to deal with a situation where we hit some king of limit.