| Previous | Next |
| DB_E_ASYNCNOTSUPPORTED | DB_E_TIMEOUT |
DB_E_CANNOTCONNECT
Meaning
Windows documents DB_E_CANNOTCONNECT as “Connection to the server for this URL cannot be established”. In this case, binding to the resource URL cannot establish a connection to the named server.
Relevant contract
The OLE DB binder model maps URLs to row, rowset, stream or collection objects. URL scope, requested object type, bind flags, asynchronous capability, locks and server reachability are independent parts of the binding contract.
Investigation of this result should start with the binder or session, normalized URL, requested GUID/object type and DBBINDURLSTATUS result.
Diagnostic sequence
- Identify the exact failing stage: binding to the resource URL cannot establish a connection to the named server.
Conditions that specifically lead to it
- Cause 1: the host or endpoint is unreachable.
- Cause 2: transport or TLS negotiation fails.
- Cause 3: the URL resolves to a server that is not accepting the provider protocol.
Evidence to collect
A useful diagnostic event records provider CLSID and version, process architecture, interface IID and method, object correlation ID, transaction state and the immediately preceding HRESULT. When recording diagnostic data involving URLs containing credentials, tenant paths and remote object names, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.
- Evidence 1: normalized host and endpoint.
- Evidence 2: DNS, transport and TLS failure details.
- Evidence 3: provider-native error records and retry-after information.
Corrective actions
- Action 1: verify endpoint reachability outside the application.
- Action 2: correct proxy, TLS or provider transport configuration.
- Action 3: separate connectivity from later authentication failure.
Retry and recovery
Retry rule: retry with bounded backoff only when the transport condition is transient.
Difference from nearby HRESULT values
DB_SEC_E_AUTH_FAILED means the server was reached but identity failed, while DB_E_CANNOTCONNECT means the connection could not be established.
Practical scenario
A binder URL points to a retired host after failover; updating endpoint discovery restores the resource connection. Keeping it with the method and object state makes this scenario diagnosable instead of reducing it to “database error”.
Official Microsoft references
Looking for a different code? Search another status or error code.