Without seeing your code, I would guess that you are trying to provide a string or other character stream, probably in the form of
sqlstring = "INSERT INTO myTable (binaryField) VALUES ('" + myArrayOfBytes + "')"
Instead, use a parametrized query and provide the bytes as a parameter.