Empty DataTable Causes Errors When Table-Valued Parameter Has VARBINARY Types
问题 I have a C# web application that serves as a passthrough to SQL Server; requests that detail SQL Server commands come in, we parse the request, generate the necessary .Net types and then use them to execute SqlCommands and such. The upshot of that is that the C# web application needs to be very flexible and really can't make too many assumptions about what a request "should" look like. I recently solved a problem that was causing exceptions to be thrown when a table-valued parameter contained