XmlManager::renameContainer

API Ref

#include <DbXml.hpp>

void XmlManager::renameContainer(XmlTransaction &txn, const std::string &oldName, const std::string &newName);


Description: XmlManager::renameContainer

The XmlManager::renameContainer method renames the container's underlying file.

The container must be closed; the system throws an exception if the container is open.

The container must have been opened at least once; the system throws an exception if the underlying file has not yet been created.

Parameters

txn
If the operation is to be transaction-protected, the txn parameter is an XmlTransaction handle returned from XmlManager::createTransaction.
oldName
The name of the container whose name you want to change.
newName
The new container name.

Errors

The XmlManager::renameContainer method may fail and throw XmlException, encapsulating one of the following non-zero errors:

CONTAINER_OPEN
The container is open.
DATABASE_ERROR
An error occurred in an underlying Berkeley DB database. The XmlException::getDbErrno method will return the error code for the error.

APIRef

Copyright (c) 1996,2007 Oracle. All rights reserved.