---
title: badDatabase
framework: cloudkit
role: symbol
role_heading: Type Property
path: cloudkit/ckerror/baddatabase
---

# badDatabase

An error that occurs when the operation can’t complete for the specified database.

## Declaration

```swift
static var badDatabase: CKError.Code { get }
```

## Discussion

Discussion The system submitted the operation to the wrong database. Make sure you aren’t submitting a share operation to the public database, or a record zone create operation to the shared database.

## See Also

### Getting Error Codes

- [accountTemporarilyUnavailable](cloudkit/ckerror/accounttemporarilyunavailable.md)
- [alreadyShared](cloudkit/ckerror/alreadyshared.md)
- [assetFileModified](cloudkit/ckerror/assetfilemodified.md)
- [assetFileNotFound](cloudkit/ckerror/assetfilenotfound.md)
- [assetNotAvailable](cloudkit/ckerror/assetnotavailable.md)
- [badContainer](cloudkit/ckerror/badcontainer.md)
- [batchRequestFailed](cloudkit/ckerror/batchrequestfailed.md)
- [changeTokenExpired](cloudkit/ckerror/changetokenexpired.md)
- [constraintViolation](cloudkit/ckerror/constraintviolation.md)
- [incompatibleVersion](cloudkit/ckerror/incompatibleversion.md)
- [internalError](cloudkit/ckerror/internalerror.md)
- [invalidArguments](cloudkit/ckerror/invalidarguments.md)
- [limitExceeded](cloudkit/ckerror/limitexceeded.md)
- [managedAccountRestricted](cloudkit/ckerror/managedaccountrestricted.md)
- [missingEntitlement](cloudkit/ckerror/missingentitlement.md)
