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
) -> Result<(), Error>
pub unsafe fn driver_connect(
&mut self,
connection_string: &U16Str,
parent_window: HWnd,
completed_connection_string: Option<&mut OutputStringBuffer>,
driver_completion: DriverConnectOption
) -> Result<(), Error>
An alternative to connect for connecting with a connection string. Allows for completing
a connection string with a GUI prompt on windows.
Safety
parent_window must either be a valid window handle or NULL.
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 in bytes.
Maximum length of schema names in bytes.
Maximum length of table names in bytes.
Maximum length of column names in bytes.
Fetch the name of the current catalog being usd 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.