- access_mode(Mode)
- If
read
, tell the driver we only access the database in read mode. Ifupdate
(default), tell the driver we may execute update commands. - auto_commit(bool)
- If
true
(default), each update statement is committed immediately. Iffalse
, an update statement starts a transaction that can be committed or rolled-back. See section 2.4 for details on transaction management. - cursor_type(CursorType)
- I haven't found a good description of what this does, but setting it to
dynamic
makes it possible to have multiple active statements on the same connection with Microsoft SQL server. Other values arestatic
,forwards_only
andkeyset_driven
. - encoding(+Encoding)
- Define the encoding used to communicate to the driver. Defined values
are given below. The default on MS-Windows is
unicode
while on other platforms it isutf8
. Below, the *A() functions refer to the‘ansi' ODBC functions that exchange bytes and the *W() functions refer to the‘unicode' ODBC functions that exchange UCS-2 characters.- iso_latin_1
- Communicate using the *A() functions and pass bytes untranslated.
- locale
- Communicate using the *A() functions and translated between Prolog Unicode characters and their (possibly) multibyte representation in the current locale.
- utf8
- Communicate using the *A() functions and translated between Prolog Unicode characters and their UTF-8 encoding.
- unicode
- Communicate using the *W() functions.
- silent(Bool)
- If
true
(defaultfalse
), statements returningSQL_SUCCESS_WITH_INFO
succeed without printing the info. See also section 2.8.1. - null(NullSpecifier)
- Defines how the SQL constant NULL is represented. Without specification,
the default is the atom
$null$
. NullSpecifier is an arbitrary Prolog term, though the implementation is optimised for using an unbound variable, atom and functor with one unbound variable. The representationnull(_)
is a commonly used alternative.The specified default holds for all statements executed on this connection. Changing the connection default does not affect already prepared or running statements. The null-value can also be specified at the statement level. See the option list of odbc_query/4.
- wide_column_threshold(+Length)
- If the width of a column exceeds Length, use the API SQLGetData() to get the value incrementally rather than using a (large) buffer allocated with the statement. The default is to use this alternate interface for columns larger than 1024 bytes. There are two cases for using this option. In time critical applications with wide columns it may provide better performance at the cost of a higher memory usage and to work around bugs in SQLGetData(). The latter applies to Microsoft SQL Server fetching the definition of a view.