title: Inserting byte array into SQL Server
body: <p>I am constructing a <code>sql_insert_string</code> to be used in <code>Microsoft.ApplicationBlocks.Data.SqlHelper</code> to be used as follows:</p>
  
  <pre><code>SqlHelper.ExecuteNonQuery(Transaction, CommandType.Text, sql_insert_string)
  </code></pre>
  
  <p>When I hover over the SQL statement it looks like below:</p>
  
  <pre><code> string sql_insert_string = "Insert into images_table(image_id,     image_byte_array) values ('123', System.Byte[])
  </code></pre>
  
  <p>One of the insert value is a byte array as shown above. The variable has value in the byte array, say like byte[6738] . But after the <code>sql_insert_string</code> is constructed, it comes as <code>System.Byte[]</code>. The <code>image_byte_array</code> column type is <code>varbinary(max)</code>. The database is SQL Server 2008. Because of this the database throws the following error:</p>
  
  <blockquote>
    <p>An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as \"\" or [] are not allowed. Change the alias to a valid name.</p>
  </blockquote>