Variable-length binary data type in Microsoft SQL Server, where 'MAX' indicates that the data may hold up to the maximum storage size of 2^31-1 bytes.
Questions tagged [varbinarymax]
142 questions
0
votes
2 answers
File Upload to Database for ASP.Net Webpages
Im having some trouble finding a way to Upload a document to the database in varbinary(max) with ASP.Net Webpages 2 and I would also like to download it.
So far what i have is this below which supposed to upload a file to a directory on the website…

Patient Professional
- 13
- 2
- 6
0
votes
1 answer
Varbinary Column
I am inserting varbinary using following SQL:
CREATE TABLE [dbo].[documentUpload](
[fileName] [nvarchar](150) NULL,
[fileContent] [varbinary](max) NULL,
)
INSERT INTO documentUpload (fileName,fileContent) …
0
votes
1 answer
PetaPoco Varbinary(max) and IdentityColumn
I have problem to get Identity value after inserting row with varbinary(max) column type. Here is the code which I use (according to PetaPoco Page):
using (var uow = UnitOfWorkFactory.Create())
{
var result = uow.Db.Execute(@"INSERT INTO…

Kamil
- 149
- 1
- 2
- 10
0
votes
1 answer
varbinary(max) capture and store OLE image
I support an application that has a SQL Server backend and an Access front end. A signature image is stored in a varbinary(max) column in a table in SQL Server, the Users table. The value in this field is displayed in various Access…

John Brainerd
- 1
- 2
0
votes
1 answer
How to identify a Null value from Varbinary(max) Linq to sql query in C#?
My goal is to execute a linq to sql query that will return a value from a varbinary(max) database field if the varbinary(max) field is not null. In the code below, x.doc is a varbinary(max) in the database.
The basics of my code is this:
var…

David
- 15
- 12
0
votes
0 answers
Error when saving image file into Sql database
I use Entity Framework and LINQ.
Simply, I want to take image file from fileupload control, and save it in a SQL Server database. But I get an error..
Table: Images
imageId int
imageData varbinary(max)
Stored procedure:
ALTER proc…

perlynsparks
- 401
- 3
- 7
- 20
0
votes
0 answers
RTRIM not working as expected
I am facing a strange issue where RTRIM which I have used thousands of times is not working as expected. It's almost like there are characters at the end that look like spaces but SQL 2008 is not treating them like spaces, therefore the "spaces" at…

Matt Weick
- 332
- 6
- 19
0
votes
2 answers
Storing pdf to varbinary(max) field with php and MS SQL
I'm working with MS SQL 2005 and PHP, and I got this code
move_uploaded_file($_FILES["file"]["tmp_name"],"temp/" . $_FILES["file"]["name"]);
$data = fopen("temp/"$_FILES["file"]["name"], "rb");
$content…

milo
- 132
- 2
- 9
0
votes
1 answer
Store Bitmap converted to byte array in Varbinary(MAX) or Image data type of SQL Server
I want to store image in a SQL Server database. I have converted image to byte array, and the data type of column in database is varbinary(MAX) but it didn't work even I have changed its type to Image but I get the same results.
I have followed many…

Assassino
- 31
- 1
- 3
- 11
0
votes
2 answers
read and write image from or to database
I try to show an image stored in a database. I wrote it with
$image = file_get_contents($testPfad);
$dateigroesse = filesize($testPfad);
$arrData = unpack("H*hex", $image);
$data_string = "0x".$arrData['hex'];
$sql = "INSERT INTO…

alex
- 1,999
- 3
- 16
- 18
0
votes
0 answers
Force create file from varbinary(max)
I have a need to transfer files from one application to another using ColdFusion 9. In application 'A' - the files are stored as varbinary(max). The API for application 'B' requires a path and filename. I'd like to be able to save the file from…

PianoServant
- 1
- 1
0
votes
2 answers
A default varbinary(max) value for image
I have a web application which has a user to insert images. I am finding a way to set a default varbinary(MAX) value in database (SQL Server 2008). Maybe something like Facebook which has a default profile picture once you sign up. I am able to…

XiAnG
- 245
- 2
- 9
- 25
0
votes
1 answer
WP7 retrieving audio binary from database
I have an issue with using FileStream to retrieve and use audio binary from Sql server database. I tried MemoryStream but wasn't working. Here's my codes for inserting the audio binary to the database using windows form.
try
{
…

Marcus Quek
- 25
- 5
0
votes
1 answer
Save StringBuilder contents into a SQL DB field
I have some text in a String Builder Object in my ASP.NET page, I want to save it into a field in an SQL Server database. I am taking varBinary(max) for that, but not able to save it.
Please tell me which is the best way to do so?

Schatak
- 1
- 1
0
votes
2 answers
Uploading files to SQL Server 2012 with ASP.NET/VB.NET
I followed a tutorial an ran the below code without any errors. The file "uploads", however no data is inserted into my SQL Server table.
Data should be inserted into the content table.
Content Table:
Document.aspx
Imports…

Brian
- 1,951
- 16
- 56
- 101