dbsqlite.mod incbin doesn't work?
BlitzMax Forums/Brucey's Modules/dbsqlite.mod incbin doesn't work?
| ||
I tried to incbin a readonly sqlite database but unfortunately the connection doesn't open this way. I tried it with Global DBname:String = "mydatabase.sqlite" db:TDBConnection = LoadDatabase("SQLITE", "incbin::"+DBname) but it didn't work. Then I tried If sqlite3_open("incbin::" + convertISO8859toUTF8(_dbname), Varptr handle) = SQLITE_OK Then in the Method "open" in "dbsqlite.bmx" but didn't work either. Is it possible somehow or can anybody help? Without incbin everything works like it should. Last edited 2011 |
| ||
SQLite doesn't support in-memory databases in that way. You can create an in-memory database on-the-fly by using a database name of ":memory:", which will create a database in memory until it is closed. Once you have your in-memory database, you could, in theory, populate it from a disk-based database, using an "INSERT ... INTO ... SELECT * FROM ..". query. Hope this helps. |
| ||
Apparently, it may be possible to do the "load into memory" step in one go : http://www.sqlite.org/backup.html |
| ||
ahh ok - I implemented it now using a CSV as source data I could incbin now and populate the DB from there. But it takes some time in the beginning, I need to check this out further. Thanks! |