Questions tagged [varbinarymax]

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.

142 questions
2
votes
1 answer

SQL Server MDF file grows much too big for the amount of data inserted

I have a table which stores binary data. It has 490,409 rows. When I sum the datalength of the binary varbinary(MAX) column, the total size comes to about 12gb. However, every time I insert new rows, the .MDF files grows in GBs, even when I'm…
jdf35w
  • 29
  • 2
2
votes
2 answers

Import VARBINARY(MAX) column data from remote SQL Server (other domain) to local SQL Server

I have to import the table data in VARBINARY(MAX) format from one SQL Server (located on remote machine on other domain where i can connect through RDP connection) to my local box. i did try the method to export the data from source to txt file by…
Atul Bansal
  • 151
  • 2
  • 12
2
votes
1 answer

unable to update varbinary(max) column in sql server

I'm trying to update my profile picture using varbinary (SQL Server 2008). It don't seem to update the picture that I put in the fileupload. Then I try to set my profile picture column to NULL it also don't seem to be working too. Below is the code…
XiAnG
  • 245
  • 2
  • 9
  • 25
1
vote
1 answer

VarBinary(max) to list of integers

For my application I dump some values into a column of varbinary(max). Now I'm trying to fetch the data from there again an would like to get a list from sql back with all values. Within my C# application I perform the following task: Data =…
Foitn
  • 604
  • 6
  • 25
1
vote
2 answers

Entity Framework returning different value for varbinary type in database

I'm a newbie to C# and EF so apologies if I get some terminology incorrect as I'm currently fixing some code from a developer who wrote our Web APIs but is not available. In summary we have a JAVA front end that uploads PDF files and stores them in…
doktorg
  • 187
  • 1
  • 12
1
vote
1 answer

Retrieving binary data [varbinary(max)] from SQL Server 2008 using JSP

Here is the query I am using to create and insert binary data in SQL Server 2008 Create query: CREATE TABLE Employees ( Id int, Photo varbinary(max) not null, Name varchar(50) not null, Sound varbinary(max) not null ) Insert query: INSERT INTO…
user646093
  • 1,495
  • 3
  • 15
  • 20
1
vote
1 answer

UPDATE VARBINARY(MAX) column in SQL Server table with $_FILE image upload

I've been looking all across the internet for help on this and have found nothing. Basically I need to know how to update a SQL Server VARBINARY(MAX) column with the hex of an image uploaded from a HTML form. The database is in a different place to…
Liam
  • 11
  • 1
1
vote
1 answer

Update varbinary column with latest file using filepath column from record

I am trying to update a series of Document_Files that are stored in the following table. Document_File: FileID int TypeID int FilePath nvarchar(255) FileData varbinary(max) I am trying to update the FileData column for each record of a specific…
ryeguy
  • 9
  • 2
1
vote
0 answers

Using EF Core, How Do You Set the Maximum Size of a File Uploaded to a Property with Data Type of Byte[]

CONTRACT TABLE [MaxLength(2000000)] [Required, FileExtensions(Extensions = ".PDF"] public byte[] Document { get; set; } I want to limit the user to uploading a PDF file no greater than 2 MB in size. So, I used the MaxLength and FileExtension…
1
vote
1 answer

Insert Blob into VARBINARY(MAX) into column encrypted table on SQL Server using pyodbc

I am currently investigating the use of the Always Encrypted feature for Microsoft SQL Server. I'm trying to simply store a blob object in a column encrypted table ('randomised') using pyodbc. Where the code works perfectly fine on non-encrypted…
1
vote
1 answer

Insert varbinary data in a stored procedure T-SQL

I have created a Template table in SQL Server 2014 and want to create a procedure for adding templates (Word template files) and template names. I have created the below table: create table Template ( PK_TemplateID int identity(1,1) primary…
Caspar
  • 11
  • 2
1
vote
0 answers

SQL Fulltext index seems to ignore subscript/superscript numbers

I have a fulltext index on a binary field that stores superscript and subscript numbers. When searching the field, the same results are returned whether you add super/sub script numbers to your search or not. Some details on how this is…
1
vote
1 answer

export binary data to xml and read back the same in sql server

We have a requirement to send varbinary data in xml as a tag and we we have to read that xml in another sql server db and we have to receive the source data, but I'm not able to make it. Here is the piece of code: DECLARE @cmds NVARCHAR(MAX) DECLARE…
Vijay A
  • 11
  • 1
  • 2
1
vote
1 answer

TSQL in Memory VarBinary to Text File?

With SQL Server 2008, I have a stored procedure that accepts a VarBinary parameter. While the parameter is in memory, I would like to write it to the %temp% directory of the SQL Server. How can I go from memory blob (it came as a byte[] from a C#…
Snowy
  • 5,942
  • 19
  • 65
  • 119
1
vote
1 answer

SQL Server CTE statement Varbinary(MAX) Not Returning the RootID

I have a hierarchy table to store a binary tree. I'm using a recursive query to retrieve the tree level based on the IntroducerID as the "RootID". The value returned as what I expected, but after the AgentId number increment reached 116, this CTE…
1 2
3
9 10