praeclarum / sqlite-net

Simple, powerful, cross-platform SQLite client and ORM for .NET
MIT License
4.03k stars 1.42k forks source link

Insert large data (over 2GB) occurs OverflowException, how to solve it? #1233

Open liujian619 opened 3 months ago

liujian619 commented 3 months ago

I split a file into chunks, and then insert the chunk data into sqlite db file. As below

foreach (var chunk in chunks)
{
    Connection.Insert(chunk);
}

When the file size is less than 2GB, all is ok. But if the file size is more than 2GB, it occurs an OverflowException while the sum of the chunks is just over 2GB.

Why? And how to solve it?

Thanks!!