Navigation: Developing Apps > BINETIX® AGE™ API > Plugins > Database Drivers > ADO DB Driver > Functions
use/4
Description
use/4 is an Erlang function exported by "ado" module.
This function combines the DB registration with gathering a new DB handle.
References
•register/2
•open/3
Parameters
Name
Type
Database
atom()
Connection ID to the database.
Params
[]
List of tuples with all parameters required to establish a new connection.
User
string()
User name required to open a new DB handle.
Password
User password required to open a new DB handle.
Result
Value or Type
{db_handle, integer()}
On success returns the DB handle.
Code Sample
> ado:use(test_db, [{db_constring, "Data Source=DS; Driver={SQL Server}; Server=localhost; Initial Catalog=TestDB"}], "sa", "Password").