Within the .NET code take the output from the stream and place it into a variable. In the SQL Server database you will want a table with the data type of varbinary(max) (also add what every other data you need to store in the record). Create a stored procedure with one input parameter for each piece of information you will be storing as well as one for the varbinary(max) column. Within the procedure do an insert statement into the table. Call the stored procedure from your .NET app passing in all the values to the correct input parameters.