I want to create a varbinary(16384) but cant because the size must be a max of 8000 or MAX. I don't want to use MAX because I want an error thrown if the field size inserted is greater than 16384. Is there anyway to do this?
How can I create a SQL varbinary of size greater than 8000 bytes?
1.3k Views Asked by Matt At
2
There are 2 best solutions below
0
dplante
On
Interesting, according to http://msdn.microsoft.com/en-us/library/ms143432.aspx the maximum size of varbinary is actually 2^31 - 1 for both 32-bit and 64-bit sql server
Related Questions in SQL
- Can MVC.NET prevent SQL-injection at razor or controller level?
- SQL server not returning all rows
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- Creating a parametrized field name for a SELECT clause
- Combine two rows based on common ID
- Column displays each count
- Slick query for one to optional one (zero or one) relationship
- Aggregate and count in PostgreSQL
- MAX and GROUP BY - SQL
- SQL statement for a tricky 2 table query
- How to create nested selects with sql?
- Pull and push data from and into sql databases using Excel VBA without pasting the data in Excel sheets
- Best Practice for adding columns to a Table in Oracle database
- SQL FIFO STACK using two tables
- SQL Query - Order by String (which contains number and chars)
Related Questions in SQL-SERVER
- SQL server not returning all rows
- Big data with spatial queries/indexing
- Conditional null constraint on Null
- SQL Query - Order by String (which contains number and chars)
- Optimising a slow running SQL Server Stored procedure ordered by calculated fields to return a closest match
- Dynamics CRM Publishing Customizations - Multi Developers
- Is there anyway to set the relationship of many tables from Model?
- Implementation of Rank and Dense Rank in MySQL
- ORM Code First versa Database First in Production
- MVC : Insert data to two tables
- Data streams in case of Merge
- table with multiple IDs but seperate notes need sorting (Tried SQL code to make a union query)
- SQL table Partitioning by Year with ColumnStore index implemented on the table
- Defining which network to use for SQL Server 2012 Management Studio
- Fill a week days in a table with preceding Sundays value
Related Questions in VARBINARY
- How can I extract the value of a varbinary(max) column?
- PDO SQLSRV And PDO Dblib Giving Different Result for Varbinary Datatype
- SQL varbinary column to byte array in c# fails when result set is passed in as XML
- How to handle and escape varbinary database entries correctly in python
- Huge sql server database with varbinary entries
- SQLEXPRESS: Bounding box from geometry
- Working with Binary Data in MySQL
- MySQL in Java: using a LIKE query on a varbinary field?
- Assigning an empty binary value to a varbinary(MAX) column creates a column 8000 bytes long
- Streaming VARBINARY data from SQL Server in C#
- stream varbinary PDF file from SQL 2005 to browser using ASP
- What is correct way to declare varbinary in SQL Server 2008?
- Inserting an image retrieved from a web url into a SQL Server database as a varbinary column
- Perl DBI / FreeTDS / SQL-Server: How to insert/update BLOB varbinary(max) data?
- TSQL vbinary bitmasking with varbinary right hand side operator
Related Questions in VARBINARYMAX
- Unable to insert documents
- Photos as Varbinary(MAX) in SQL Server 2012 causes error 502753 in Access 2010
- How can I extract the value of a varbinary(max) column?
- How to display data(with image) in gridview or treeview having parent child relationship in asp.net
- Cannot Display image from Sql Server using PHP PDO using Varbinary Max
- How to extract a file having varbinary column in u-sql script using default Extractor?
- Assigning an empty binary value to a varbinary(MAX) column creates a column 8000 bytes long
- Calling MySQL stored procedure that takes longblob/varbinary(max) param from MS SQL Server
- Varbinary(max) insertion - duplication of varbinary(max) fields between unrelated db records
- Deleting varbinary(MAX) from SQL Server column
- Add default value to a Varbinary column in SQL Server
- How can I create a SQL varbinary of size greater than 8000 bytes?
- inserting a File as Varbinary(MAX) in SQL Server 2008
- Retrieve varbinary(MAX) from SQL Server to byte[] in C#
- How can I make a download link which downloads data directly from a DB in ASP.NET?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Use MAX. Constrain the field and handle the error in the data layer / application.
It sounds like you are trying to push data to a table, and are depending upon the SQL Server to throw back an error. IMO, this is too far 'down stream' to handle this type of thing.