Using a stored procedure, simply create a parameter of type varbinary (max) and paste it into the table, like any data type.
In C # code (or vb or something else) add the parameter to your sql command line object and set the byte array as the parameter value:
command.Parameters.AddWithValue("@parameter_name", myByteArray);
If you do not use the stored procedure, you can do the same with the parameterized sql statement, but I never tried this, so I can not give an example.
Edit:
You are using a parameterized query, which is not my business, so I can not guarantee that this will work. But here is the code you have to do.
RemoteSQLcmd = New SqlCommand("INSERT INTO Table(1) Values (newid(), ProductID, @bin_value", RemoteSQLConn) RemoteSQLcmd.Parameters.AddWithValue(@bin_value", imSource) ;
The binary value must be represented as a parameter (@bin_value), and the value is set by the AddWithValue statement. The parameter name must not match the column name.
A few notes: I would suggest using column names in your insert statement, and not depending on the column position. Also, I don't know what you mean by "table (1)" - is that really the name of the table?
source share