Struct odbc_safe::Environment [] [src]

pub struct Environment<V> { /* fields omitted */ }

An Environment is a global context, in which to access data.

Associated with an Environment is any information that is global in nature, such as:

  • The Environment's state
  • The current environment-level diagnostics
  • The handles of connections currently allocated on the environment
  • The current stetting of each environment attribute

See: [Environment Handles in the ODBC Reference][1] [1]: https://docs.microsoft.com/sql/odbc/reference/develop-app/environment-handles

Methods

impl<V> Environment<V>
[src]

[src]

Provides access to the raw ODBC environment handle.

impl<V: Version> Environment<V>
[src]

[src]

Fills buffers with information about the available datasources

A 32 / 64 Bit Application will only return information about either 32 or 64 Bit DataSources.

Returns

(server_name_length, description_length)

See [SQLDataSources][1] [1]: https://docs.microsoft.com/sql/odbc/reference/syntax/sqldatasources-function

[src]

Fills buffers with information about the available datasources

A 32 / 64 Bit Application will only return information about either 32 or 64 Bit DataSources.

Returns

(description_length, attributes_length)

See [SQLDrivers][1] [1]: https://docs.microsoft.com/sql/odbc/reference/syntax/sqldrivers-function

impl Environment<NoVersion>
[src]

[src]

Allocates a new Environment

[src]

Before an application allocates a connection which specification it follows. Currently these bindings only support ODBC 3.x.

It is valid to specify ODBC 3.x even then connecting to an ODBC 2.x driver. Applications must however avoid calling 3.x functionality on 2.x drivers. Since drivers are connected at runtime, these kind of errors can not be catched by the type system.

[src]

Before an application allocates a connection which specification it follows. Currently these bindings only support ODBC 3.x.

It is valid to specify ODBC 3.x even then connecting to an ODBC 2.x driver. Applications must however avoid calling 3.x functionality on 2.x drivers. Since drivers are connected at runtime, these kind of errors can not be catched by the type system.

This method is a shorthand for declare_version::<Odbc3m8>.

[src]

Before an application allocates a connection which specification it follows. Currently these bindings only support ODBC 3.x.

It is valid to specify ODBC 3.x even then connecting to an ODBC 2.x driver. Applications must however avoid calling 3.x functionality on 2.x drivers. Since drivers are connected at runtime, these kind of errors can not be catched by the type system.

This method is a shorthand for declare_version::<Odbc3>.

Trait Implementations

impl<V: Debug> Debug for Environment<V>
[src]

[src]

Formats the value using the given formatter. Read more

impl<V> Diagnostics for Environment<V>
[src]

[src]

Returns the current values of multiple fields of a diagnostic record that contains error, warning, and status information. Read more

Auto Trait Implementations

impl<V> !Send for Environment<V>

impl<V> !Sync for Environment<V>