Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need to put a Varbinary value in field.

Posted on 2011-09-10
2
Medium Priority
?
398 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 2000 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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
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.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

636 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