OpenDatabase: SQLite Database Creation if file not found
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
OpenDatabase: SQLite Database Creation if file not found
Srod wonders whether the PB team could add functionality to create an empty database for OpenDatabase() in cases where the file is not found and UseSQLiteDatabase() is called first.
BERESHEIT
Re: OpenDatabase: SQLite Database Creation if file not found
Uhm, must be a different srod!netmaestro wrote:Srod wonders whether the PB team could add functionality to create an empty database for OpenDatabase() in cases where the file is not found and UseSQLiteDatabase() is called first.

I may look like a mule, but I'm not a complete ass.
The following highly complex code will successfully create an empty SQLite database:
Code: Select all
CreateFile(#file, DbPath$)
CloseFile(#file)
Anthony Jordan
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada