Solved

Need to put a Varbinary value in field.

Posted on 2011-09-10
2
357 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
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.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now