I'm writing a function which reads a file and writes the data to out a column defined as varbinary(max).I have this code to read the data. Dim buffer As Byte() = New Byte(CInt(len) - 1) {} fu.FileContent.Read(buffer, 0, buffer.Length)
That works fine.Now I want to construct a SQL command.dim cmd as Stringcmd = "Update mytable set mycolumn = '"+buffer+"' where key=2"
I don't how to do the above. I tried buffer.tostring() but that wasn't right. Do I need a loop? Thanks.