Struct odbc_api::handles::Connection [−][src]
pub struct Connection<'c> { /* fields omitted */ }Expand description
The connection handle references storage of all information about the connection to the data source, including status, transaction state, and error information.
Implementations
Safety
Call this method only with a valid (successfully allocated) ODBC connection handle.
Establishes connections to a driver and a data source.
Arguments
data_source_name- Data source name. The data might be located on the same computer as the program, or on another computer somewhere on a network.user- User identifier.pwd- Authentication string (typically the password).
An alternative to connect. It supports data sources that require more connection
information than the three arguments in connect and data sources that are not defined in
the system information.
pub unsafe fn driver_connect(
&mut self,
connection_string: &U16Str,
parent_window: HWnd,
completed_connection_string: Option<&mut OutputStringBuffer>,
driver_completion: DriverConnectOption
) -> Option<SqlResult<()>>
pub unsafe fn driver_connect(
&mut self,
connection_string: &U16Str,
parent_window: HWnd,
completed_connection_string: Option<&mut OutputStringBuffer>,
driver_completion: DriverConnectOption
) -> Option<SqlResult<()>>
Disconnect from an ODBC data source.
Allocate a new statement handle. The Statement must not outlive the Connection.
Specify the transaction mode. By default, ODBC transactions are in auto-commit mode (unless SQLSetConnectAttr and SQLSetConnectOption are not supported, which is unlikely). Switching from manual-commit mode to auto-commit mode automatically commits any open transaction on the connection.
Fetch the name of the database management system used by the connection and store it into
the provided buf.
Maximum length of catalog names.
Maximum length of schema names.
Maximum length of table names.
Maximum length of column names.
Fetch the name of the current catalog being used by the connection and store it into the
provided buf.
Trait Implementations
The raw underlying ODBC handle used to talk to the ODBC C API. The handle must be valid.
The type of the ODBC handle returned by as_handle.