[][src]Trait odbc_safe::Diagnostics

pub trait Diagnostics {
    fn diagnostics(
        &self,
        rec_number: SQLSMALLINT,
        message_text: &mut [SQLCHAR]
    ) -> ReturnOption<DiagResult>; }

A type implementing this trait is able to provide diagnostic information regarding the last method call.

Required methods

fn diagnostics(
    &self,
    rec_number: SQLSMALLINT,
    message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>

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

Arguments

  • rec_number - Indicates the status record from which the application seeks information. Status records are numbered from 1.
  • message_text - Buffer in which to return the diagnostic message text string. If the number of characters to return is greater than the buffer length, the diagnostic message is truncated to max(message_text.len() - 1, 0). For the format of the string, see [Diagnostic Messages][1]

Result

`

  • Success - The function successfully returned diagnostic information.
  • Info - The message_text buffer was too small to hold the requested diagnostic message. No diagnostic records were generated. To determine that a truncation occurred, the application must compare the buffer length to the actual number of bytes available, which is found in DiagResult::text_length
  • Error - rec_number was negative or 0.
  • NoData - rec_number was greater than the number of diagnostic records that existed for the specified Handle. The function also returns NoData for any positive rec_number if there are no diagnostic records available. [1]: https://docs.microsoft.com/sql/odbc/reference/develop-app/diagnostic-messages
Loading content...

Implementors

impl<'con, 'param, 'col, C, A> Diagnostics for Statement<'con, 'param, 'col, C, A>[src]

impl<'env, S> Diagnostics for DataSource<'env, S> where
    S: HDbcWrapper<'env>, 
[src]

impl<H: Handle> Diagnostics for H[src]

impl<S, E> Diagnostics for Return<S, E> where
    S: Diagnostics,
    E: Diagnostics
[src]

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

Loading content...