Solved

Need to put a Varbinary value in field.

Posted on 2011-09-10
2
378 Views
Last Modified: 2012-05-12
I need to place a value in this field for something I'm testing :

PictureBinary      varbinary(MAX)      not null

But I get errors when I try 0, 0x0, . . . (see pic)

What (binary) value can I put in there just so I can create the row? thanks


 error
0
Comment
Question by:MikeMCSD
2 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 36517191
As the message indicates the only value you can enter is NULL.  You will have to use an INSERT statement in order to do enter something other than NULL.  As in:
INSERT YourTable (PictureBinary) VALUES  (Cast('0x0' AS varbinary(MAX)))

0
 
LVL 16

Author Comment

by:MikeMCSD
ID: 36517222
thanks
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to check mis-spellings in a select SQL 2 37
Need sql in string 2 28
removing unwanted rows from an sql server ranked table 13 34
SQL- GROUP BY 4 21
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question