Navigation: Developing Apps > BINETIX® AGE™ API > Plugins > Database Drivers > ADO DB Driver > Functions
execute_sql/3
Description
execute_sql/3 is an Erlang function exported by "ado" module.
Prepares and executes SQL query using an existing DB connection. If the connection does not exist, or it is closed already, then returns error.
References
•connect/3
Parameters
Name
Type
Connection
integer()
Connection handle.
SQL
string()
Query string.
Params
[]
Optional. List of substitution parameters within the SQL string. Defaults to [].
Result
Value or Type
{sql_result, []}
DB records.
Code Sample
> ado:execute_sql(7689345632, "select * from Table1").