Re: Trouble with Database(EDS)
- Posted by ghaberek (admin) Sep 18, 2018
- 2292 views
Icy_Viking said...
Ok I got it to open after deleting the previously made database. How do I make it so I can test it without the couldn't create database error coming up again? I'm using the Eu4 version of EDS.
Here is a quick shorthand function you can use to always open your database with the correct method.
include std/eds.e public function db_load( sequence path, integer lock_mode = DB_LOCK_EXCLUSIVE ) if db_select( path ) = DB_OK then return DB_OK end if if db_open( path, lock_mode ) = DB_OK then return DB_OK end if return db_create( path, lock_mode ) end function
-Greg