Navigation
This version of the documentation is archived and no longer supported.

db.getLastError()

db.getLastError()
Returns:The last error message string.

Sets the level of write concern for confirming the success of write operations.

See

getLastError and Write Concern Reference for all options, Write Concern for a conceptual overview, Write Operations for information about all write operations in MongoDB, .