[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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

Namespace: Db4objects.Db4o.Ext
Assembly:   Db4objects.Db4o (in Db4objects.Db4o.dll)

Syntax

Visual Basic (Declaration)
Sub SwitchToFile ( _
	fileName As String _
)
C#
void SwitchToFile (
	string fileName
)
Visual C++
void SwitchToFile (
	String^ fileName
)

Parameters

fileName
System.String
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.