I want to make a raw SQL query that adds an encrypted value (byte[]) to an SQL column (varbinary) without using parameter like this:
byte[] value = GetEncryptedValue();
string query = "INSERT INTO Table1 VALUES('" + value.ToString() + "')";
the column datatype that I want insert into is varbinary. I need some function that uses value.ToString() instead. How to write this ?
i just need function like master.dbo.fn_varbintohexstr in sql!!!
INSERT ...from existing data and apply to some other DB