[][src]Function odbc::create_environment_v3

pub fn create_environment_v3(
) -> Result<Environment<Version3>, Option<DiagnosticRecord>>

Creates an ODBC Environment and declares specification of version 3.0 are used

Example

use odbc::*;
fn do_database_stuff() -> std::result::Result<(), Option<DiagnosticRecord>> {
    let env = create_environment_v3()?; // first thing to do
    // ...
    Ok(())
}

Return

While most functions in this crate return a DiagnosticRecord in the event of an Error the creation of an environment is special. Since DiagnosticRecords are created using the environment, at least its allocation has to be successful to obtain one. If the allocation fails it is sadly not possible to receive further Diagnostics. Setting an unsupported version may however result in an ordinary Some(DiagnosticRecord).