Struct odbc::DataSource
[−]
[src]
pub struct DataSource<'a> { /* fields omitted */ }
Represents a connection to an ODBC data source
Methods
impl<'a> DataSource<'a>
[src]
fn with_dsn_and_credentials<'b>(env: &'b mut Environment,
dsn: &str,
usr: &str,
pwd: &str)
-> Result<DataSource<'b>>
dsn: &str,
usr: &str,
pwd: &str)
-> Result<DataSource<'b>>
Connects to an ODBC data source
Arguments
env
- Environment used to allocate the data source handle.dsn
- Data source name configured in theodbc.ini
file!()usr
- User identifierpwd
- Authentication (usually password)
fn read_only(&self) -> Result<bool>
true
if the data source is set to READ ONLY mode, false
otherwise.
This characteristic pertains only to the data source itself; it is not characteristic of the driver that enables access to the data source. A driver that is read/write can be used with a data source that is read-only. If a driver is read-only, all of its data sources must be read-only.
unsafe fn raw(&mut self) -> SQLHDBC
Allows access to the raw ODBC handle