Is it possible to create and use an sqlite database in memory? I found this thread:
http://www.purebasic.fr/english/viewtopic.php?t=27149
But the code no longer works and I can't wrap my head around it.
sqlite in memory?
Re: sqlite in memory?
use the native pb functions:
Here a more complete example
Code: Select all
UseSQLiteDatabase()
If OpenDatabase(0, ":memory:", "", "")
If DatabaseUpdate(0, "CREATE TABLE info (test VARCHAR(255));")
Debug "Table created"
EndIf
EndIf
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
jerico2day
- User

- Posts: 37
- Joined: Mon Jul 13, 2009 5:41 pm
Re: sqlite in memory?
Ah wonderful. Thanks!
-
kinglestat
- Enthusiast

- Posts: 746
- Joined: Fri Jul 14, 2006 8:53 pm
- Location: Malta
- Contact:
Re: sqlite in memory?
you can also set the temporary storage #PRAGMA to MEMORY and create your table in temp...eg CREATE TABLE temp.mytable.....
this way you can operate both ways
I have a post to this effect somewhere on the forum dont ask me where I am hopeless in navigating the web (and this forum in particular!)
this way you can operate both ways
I may not help with your coding
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
