SQLite Forum

How to Increase BLOB Size Limit in C#
Login

How to Increase BLOB Size Limit in C#

(1) By Scott (Scott-PKI) on 2020-11-30 20:21:01 [source]

Hi All,

Currently the maximum size of a BLOB is 1 GB.
Would like to increase it to 2 GB.

Find the following documentation which seems to imply to re-compile SQLite source code?:
https://www.sqlite.org/limits.html
1.	Maximum length of a string or BLOB
The maximum number of bytes in a string or BLOB in SQLite is defined by the preprocessor macro SQLITE_MAX_LENGTH. The default value of this macro is 1 billion (1 thousand million or 1,000,000,000). 
You can raise or lower this value at compile-time using a command-line option like this:
-DSQLITE_MAX_LENGTH=123456789

Note I am using C# with System.Data.SQLite (NuGet v 1.0.109.2)
Is there a way to change this upper limit using C#?
If not how can this limit be changed for use with C# code?

Regards,
Scott