db4o |

# ExtClient.switchToFile Method

requests opening a different server database file for this client session.

void switchToFile(
string fileName
);

#### Parameters

fileName
  the fully qualified path of the requested database file.

#### Remarks

requests opening a different server database file for this client session.
This method can be used to switch between database files from the client side while not having to open a new socket connection or closing the current one.
If the database file does not exist on the server, it will be created.
A typical usecase:
The main database file is used for login, user and rights management only. Only one single db4o server session needs to be run. Multiple satellite database files are used for different applications or multiple user circles. Storing the data to multiple database files has the following advantages:
- easier rights management
- easier backup
- possible later load balancing to multiple servers
- better performance of smaller individual database files
- special debugging database files can be used
User authorization to the alternative database file will not be checked.
All persistent references to objects that are currently in memory are discarded during the switching process.

#### See Also

ExtClient Interface | com.db4o.ext Namespace