I am running into an issue with a sqlite database program. I am trying to attach 30 databases together and running into a limit of 10 error:
“SQLite error
too many attached databases – max 10”
According to http://www.sqlite.org/c3ref/limit.html we should be able to set the max number of allowed attached databases to more than 10. I am using C# and system.data.sqlite.dll for the interface. Does anyone know how I could set the limit > 10?
From the implementation limits page (emphasis mine):
From the Run-time limits page:
Based on the fact that you can only lower the limit, I think the
SQLITE_LIMIT_ATTACHEDis a compiled constant set to 10. If you want to make it larger, you’ll have to change it in source code and recompile SQLite.And there’s more:
There you have it. Even if you make it larger than 10, 62 is a physical hard limit due to the architecture of the database.