Hi SuperSpike,
Based on my understanding, you want to know how to store the data into database with varbinary data type. You also want to know how to contain this varbinary value in the code. If I have misunderstood you, please feel free to let me know.
If you want to store data, such as image file, into database with varbinary data type, you should read the image into binary data and then insert this binary data into database. If you want to read this binary data in the code, you can use byte[] to contain the data.
There are a couple of articles: Bind Image from Database to DataGrid (web Application) and Storing Binary Data to Database using ASP.NET 2.0, where you can find more useful information.
I hope this helps.
This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.