Solved

Need to put a Varbinary value in field.

Posted on 2011-09-10
2
383 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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 SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

737 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