Storing data in a varbinary field in SQL
Hi,
I'm new to Java. I'm trying to update a byte array (byte[]) field in java into a Varbinary column in SQL.
byte[] xxx ... statement returns a value of B@1d7ad1c
MyString = "INSERT INTO MyTable " +
"VALUES ('" + name + "'," + xxx + ",'test')";
I get the following error:
SQLException: Unclosed quotation mark before the character string 'B@1d7ad1c,'test')'.
How do I update the byte[] field into a varbinary column in sql.
Thanks in advance for your help.
|