| Previous | Next |
| DB_E_PARAMUNAVAILABLE | DB_E_NOTSUPPORTED |
DB_E_ALREADYINITIALIZED
Meaning
Windows documents DB_E_ALREADYINITIALIZED as “Data source object is already initialized”. In this case, initialization or initialization-property mutation is attempted after the data source object has already entered the initialized state.
Conditions that specifically lead to the result
- Cause 1: Initialize is called twice on the same object.
- Cause 2: initialization properties are changed after a successful Initialize.
- Cause 3: a pooled wrapper exposes an already initialized object as if it were new.
Relevant contract
OLE DB initialization strings select a provider and set initialization properties before IDBInitialize::Initialize. Syntax errors, missing provider registration and a provider mismatch are distinct from server connectivity and authentication failures.
Investigation of this result should start with the uninitialized data source object, parsed initialization properties and provider CLSID or ProgID.
Diagnostic sequence
- Identify the exact failing stage: initialization or initialization-property mutation is attempted after the data source object has already entered the initialized state.
Evidence to collect
When recording diagnostic data involving passwords, tokens, server names and complete connection strings, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.
- Evidence 1: the object identity and initialization-state transitions.
- Evidence 2: the first successful Initialize result.
- Evidence 3: properties the caller attempted to change after initialization.
Corrective actions
- Action 1: reuse the initialized object without reinitializing it.
- Action 2: call the documented uninitialize path before changing initialization state.
- Action 3: create a new data source object when immutable initialization properties differ.
Practical scenario
A pool checkout routine always calls Initialize even for live pooled objects; recording state prevents the redundant call.
Retry and recovery
Retry rule: retry only after returning the object to an uninitialized state or replacing it.
Difference from nearby HRESULT values
CO_E_ALREADYINITIALIZED is a COM-wide condition, while DB_E_ALREADYINITIALIZED is the OLE DB data-source state result.
Official Microsoft references
Looking for a different code? Search another status or error code.