Navigation: Developing Apps > BINETIX® AGE™ API > Plugins > Database Drivers > ADO DB Driver > Functions
register/2
Description
register/2 is an Erlang function exported by "ado" module.
This function registers a new DB configuration for ADO connectivity. The Database connection name is used by other functions.
References
•unregister/1
•open/3
Parameters
Name
Type
Database
atom()
Database ID to the database.
Params
[]
List of tuples with parameters required to database connectivity.
Result
Value or Type
{?ADO, registered, Database}
Code Sample
> ado:register(test_db, [
{db_username, "sa"},
{db_password, "123456"},
{db_constring,
"Data Source=DS; Driver={SQL Server}; Server=localhost; Initial Catalog=TestDB"
}
]).