10.14.5 Predicates

odbc_env_open(-EnvHandle)
Opens an ODBC environment. Throws an exception if the environment could not be opened.
odbc_db_open(+Dbname,+EnvHandle,-ConnectionHandle)
Opens a database with the name Dbname. The database cannot require a username and a password. ConnectionHandle is an opaque handle for accessing the database.
odbc_db_open(+Dbname,+EnvHandle,+Options,-ConnectionHandle)
Opens a database with the name Dbname. Options should be a list of zero or more of:
username(+Username)
The username for connecting to the database. The default is ''.
password(+Password)
The password for connection to the database. The default is ''.
login_timeout(+Timeout)
The number of seconds to wait for a login request to complete. If 0 is used, the login attempt will wait indefinitely. The default is driver-dependent.
connection_timeout(+Timeout)
The number of seconds to wait for any request on the connection to complete. If the Timeout value is 0 (the default), there is no timeout.
ConnectionHandle is an opaque handle for accessing the database.
odbc_db_open(+Dbname,+EnvHandle,-ConnectionHandle,Options,-ConnectionString)
Like odbc_db_open/4 but also returns the completed connection string returned by the ODBC driver.
odbc_query_open(+ConnectionHandle, -StatementHandle)
Creates a new database query. ConnectionHandle is a handle previously allocated with odbc_db_open/[3,4,5].
odbc_list_DSN(+EnvHandle,-DSNs)
EnvHandle is an opaque database handle. DSNs is unified with a list of all DSNs (Data Source Names). The list elements are X-Y where X is the DSN and Y its description.
odbc_list_data_types(+StatementHandle, +TableDesc, -DataTypes)
Makes a list of the datatypes in a table. StatementHandle is a handle previously allocated with odbc_query_open/2. TableDesc is a description of the table and its columns of the form tablename(columnname1, columnname2, ..., columnnameN), or of the form [tablename, columnname1, columnname2, ..., columnnameN] (the latter form is useful if the table has more than 255 columns). DataTypes is unified with a list of the corresponding datatypes, i.e. on the form [datatype1, datatype2, ... datatypeN].
odbc_query_execute_sql(+StatementHandle, +SQLString, +ParamData, +ParamDataTypes, -ResultSet)
Executes an SQL query. StatementHandle is a handle previously allocated with odbc_query_open/2. SQLString is the SQL statement to be executed. The statement string may contain parameter markers. ParamData is a list of data to be bound to the parameter markers. ParamDataTypes is a list of data types corresponding to the ParamData list. ResultSet is bound to an opaque data structure describing the result of the query.
odbc_query_execute_sql(+StatementHandle, +SQLString, -ResultSet)
StatementHandle is a handle previously allocated with odbc_query_open/2. SQLString is the SQL statement to be executed. ResultSet is bound to an opaque data structure describing the result of the query.
odbc_sql_fetch(+ResultSet, -Row)
Fetch the next row from the result set. ResultSet is the result set from odbc_query_execute_sql/[3,4,5]. Row is unified with a list of data constituting a row in the result set.
odbc_query_close(+ResultSet)
Closes the query represented by ResultSet.
odbc_db_close(+ConnectionHandle)
Closes the connection to the database.
odbc_env_close(+EnvHandle)
Frees the environment handle.

Send feedback on this subject.