[−][src]Trait odbc_safe::Diagnostics
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>
&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 tomax(message_text.len() - 1, 0)
. For the format of the string, see [Diagnostic Messages][1]
Result
`
Success
- The function successfully returned diagnostic information.Info
- Themessage_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 inDiagResult::text_length
Error
-rec_number
was negative or0
.NoData
-rec_number
was greater than the number of diagnostic records that existed for the specified Handle. The function also returnsNoData
for any positiverec_number
if there are no diagnostic records available. [1]: https://docs.microsoft.com/sql/odbc/reference/develop-app/diagnostic-messages
Implementors
impl<'con, 'param, 'col, C, A> Diagnostics for Statement<'con, 'param, 'col, C, A>
[src]
fn diagnostics(
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
[src]
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
impl<'env, S> Diagnostics for DataSource<'env, S> where
S: HDbcWrapper<'env>,
[src]
S: HDbcWrapper<'env>,
fn diagnostics(
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
[src]
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
impl<H: Handle> Diagnostics for H
[src]
fn diagnostics(
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
[src]
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
impl<S, E> Diagnostics for Return<S, E> where
S: Diagnostics,
E: Diagnostics,
[src]
S: Diagnostics,
E: Diagnostics,
fn diagnostics(
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
[src]
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
impl<V> Diagnostics for Environment<V>
[src]
fn diagnostics(
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>
[src]
&self,
rec_number: SQLSMALLINT,
message_text: &mut [SQLCHAR]
) -> ReturnOption<DiagResult>