Navigation: Developing Apps > BINETIX® AGE™ API > Plugins > Database Drivers > SQLite DB Driver > Functions
use/2
Description
use/2 is an Erlang function exported by "sqlite" module.
This function combines the DB registration with gathering a new DB handle.
References
•register/2
•open/1
Parameters
Name
Type
Database
atom()
Connection ID to the database.
Params
[]
List of tuples with all parameters required to establish a new connection.
Result
Value or Type
{db_handle, integer()}
On success returns the DB handle.
Code Sample
> sqlite:use(test_db, [{db_name, "test.db"}, {db_flag, [readwrite, create]}]).