[odb-users] Where is the database file stored in the 'hello'
example contained within the examples download
Boris Kolpackov
boris at codesynthesis.com
Tue Dec 15 07:37:06 EST 2015
Hi Rudy,
Rudy Depena <rudy.depena at gmail.com> writes:
> My question is: Once the program is through executing, where is the
> database stored?
Check the database.hxx header -- this is where the database is
opened/created. As you will see, there we use the argc/argv
version of the odb::sqlite::database constructor. And as Section
18.2, "SQLite Database Class" explains, in this case the database
name is specified with the --database command line option. So if
you run your example like this:
./driver --database c:\mydb.sqlite
Then the database file will be created in c:\ and called mydb.sqlite.
Also note that there are other versions of the constructor. Specifically,
you can pass the database file path to create/open directly, without using
the command line.
Boris
More information about the odb-users
mailing list