Next Previous Up Top Contents Index

1 The SQL-ODBC Library

1.7 Warning and error conditions

The SQL-ODBC library defines condition classes for each category of error and warning defined in SQL-92. (SQL-92 calls them classes rather than categories.)

When an error or warning occurs, SQL-ODBC detects it, creates a condition object, and signals it. You can then handle the condition using the Dylan condition system.

Some DBMSes can detect and report multiple errors or warnings during the execution of a single SQL statement. The DBMS reports these errors and warnings to the SQL-ODBC library using SQL-92's concept of diagnostics; the first error or warning in the diagnostic area is the same error or warning indicated by the SQLSTATE status parameter. The SQL-ODBC library signals a condition which corresponds to the error or warning indicated by SQLSTATE.

While handling the first condition, your application can process any additional errors or warnings that may have occurred by signaling the next DBMS condition; to obtain the next DBMS condition, call next-dbms-condition on the condition being handled.

1.7.1 - Diagnostics
row-count
<diagnostic>
condition-number
returned-sqlstate
class-origin
subclass-origin
connection-name
message-text
1.7.2 - SQL condition classes
<ambiguous-cursor-name>
<cardinality-violation>
<connection-exception>
<connection-does-not-exist>
<connection-failure>
<connection-name-in-use>
<sql-client-unable-to-establish-connection>
<sql-server-rejected-establishment-of-connection>
<transaction-resolution-unknown>
<cursor-operation-conflict>
<data-exception>
<character-not-in-repertoire>
<datetime-field-overflow>
<division-by-zero>
<error-in-assignment>
<indicator-overflow>
<interval-field-overflow>
<invalid-character-value-for-cast>
<invalid-datetime-format>
<invalid-escape-character>
<invalid-escape-sequence>
<invalid-fetch-sequence>
<invalid-parameter-value>
<invalid-time-zone-displacement-value>
<null-value-no-indicator-parameter>
<Numeric-value-out-of-range>
<string-data-length-mismatch>
<string-data-right-truncation>
<substring-error>
trim-error>
<unterminated-C-string>
<dependent-privilege-descriptors-still-exist>
<dynamic-sql-error>
<cursor-specification-cannot-be-executed>
<invalid-descriptor-count>
<invalid-descriptor-index>
<prepared-statement-not-a-cursor-specification>
<restricted-data-type-attribute-violation>
<using-clause-does-not-match-dynamic-parameter-specification>
<using-clause-does-not-match-target-specification>
<using-clause-required-for-dynamic-parameters>
<using-clause-required-for-result-fields>
<feature-not-supported>
<multiple-server-transaction>
<integrity-constraint-violation>
<invalid-authorization-specification>
<invalid-catalog-name>
<invalid-character-set-name>
<invalid-condition-number>
<invalid-cursor-name>
<invalid-schema-name>
<invalid-sql-descriptor-name>
<invalid-sql-statement-name>
<invalid-transaction-state>
<invalid-transaction-termination>
<no-data>
<remote-database-access>
<successful-completion>
<syntax-error-or-access-rule-violation>
<syntax-error-or-access-rule-violation-in-direct-sql-statement>
<syntax-error-or-access-rule-violation-in-dynamic-sql-statement>
<transaction-rollback>
<transaction-rollback-due-to-integrity-constraint-violation>
<transaction-rollback-due-to-serialization-failure>
<statement-completion-unknown>
<triggered-data-change-violation>
<sql-warning>
<warning-cursor-operation-conflict>
<disconnect-error>
<implicit-zero-bit-padding>
<insufficient-item-descriptor-areas>
<null-value-eliminated-in-set-function>
<privilege-not-granted>
<privilege-not-revoked>
<query-expression-too-long-for-information-schema>
<search-condition-too-long-for-information-schema>
<warning-string-data-right-truncation>
<with-check-option-violation>
1.7.3 - ODBC-specific extensions to the diagnostic protocol
native-error-code
column-number
row-number
1.7.4 - ODBC-specific diagnostic classes
<odbc-invalid-connection-string-attribute>
<odbc-error-in-row>
<odbc-option-value-changed>
<odbc-attempt-to-fetch-before-result-set-returned-the-first-rowset>
<odbc-fractional-truncation>
<odbc-error-saving-file-dsn>
<odbc-invalid-keyword>
<odbc-invalid-use-of-default-parameter>
<odbc-communication-link-failure>
<odbc-insert-value-list-does-not-match-column-list>
<odbc-invalid-cursor-state>
<odbc-transaction-state>
<odbc-transaction-still-active>
<odbc-transaction-is-rolledback>
<odbc-base-table-or-view-already-exists>
<odbc-base-table-or-view-not-found>
<odbc-index-already-exists>
<odbc-index-not-found>
<odbc-column-already-exists>
<odbc-column-not-found>
<odbc-general-error>
<odbc-memory-allocation-error>
<odbc-invalid-application-buffer-type>
<odbc-invalid-sql-data-type>
<odbc-associated-statement-is-not-prepared>
<odbc-operation-canceled>
<odbc-invalid-use-of-null-pointer>
<odbc-function-sequence-error>
<odbc-attribute-cannot-be-set-now>
<odbc-invalid-transaction-operation-code>
<odbc-memory-management-error>
<odbc-limit-on-the-number-of-handles-exceeded>
<odbc-no-cursor-name-available>
<odbc-cannot-modify-an-implementation-row-descriptor>
<odbc-invalid-use-of-an-automatically-allocated-descriptor-handle>
<odbc-server-declined-cancel-request>
<odbc-non-character-and-non-binary-data-sent-in-pieces>
<odbc-attempt-to-concatenate-a-null-value>
<odbc-inconsistent-descriptor-information>
<odbc-invalid-attribute-value>
<odbc-invalid-string-or-buffer-length>
<odbc-invalid-descriptor-field-identifier>
<odbc-invalid-attribute-option-identifier>
<odbc-invalid-parameter-number>
<odbc-invalid-information-type>
<odbc-scope-type-out-of-range>
<odbc-nullable-type-out-of-range>
<odbc-uniqueness-option-type-out-of-range>
<odbc-accuracy-option-type-out-of-range>
<odbc-invalid-retrieval-code>
<odbc-invalid-precision-or-scale-value>
<odbc-invalid-parameter-type>
<odbc-fetch-type-out-of-range>
<odbc-row-value-out-of-range>
<odbc-invalid-cursor-position>
<odbc-invalid-driver-completion>
<odbc-invalid-bookmark-value>
<odbc-optional-feature-not-implemented>
<odbc-connection-timeout-expired>
<odbc-driver-does-not-support-this-function>
<odbc-data-source-name-not-found>
<odbc-specified-driver-could-not-be-loaded>
<odbc-driver-SQLAllocHandle-on-SQL-HANDLE-ENV-failed>
<odbc-driver-SQLAllocHandle-on-SQL-HANDLE-DBC-failed>
<odbc-driver-SQLSetConnectAttr-failed>
<odbc-no-data-source-or-driver-specified>
<odbc-dialog-failed>
<odbc-unable-to-load-translation-dll>
<odbc-data-source-name-too-long>
<odbc-driver-name-too-long>
<odbc-DRIVER-keyword-syntax-error>
<odbc-invalid-name-of-file-DSN>
<odbc-corrupt-file-data-source>
<odbc-trace-file-error>

OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index