Table of Contents
VServer Class: Master Database Methods
VServer.RegisterDatabase()
Declaration:
RegisterDatabase( inDbName as String, inServerFullPath as String = "" )
Parameters:
- inDbName - The name of the database.
- inServerFullPath - The full path to the database (*.vdb) located on the server computer.
Description:
You can use this method to register an existing database in Vserver. This command adds a new record to the Master Database.
Usually you just should drop a database into the directory pointed to by the .ini variable “SystemCatalog”, and call this method specifying only the name of the database(*.vdb-file). If the database has been placed inside another directory you should specify the full path to the database on the server computer.
Note: For the MacOS X version of Valentina Server, use a UNIX-style path.
Errors:
- The Database Name already exists.
Example:
This assumes that a database with name “DbName” or “DbName.vdb” exists in the “databases” folder of VServer.
server.RegisterDatabase( "DbName" )
Example:
server.RegisterDatabase( "Accounting", "C:\SomeCompany\account2002.vdb" )
VServer.UnregisterDatabase()
Declaration:
UnregisterDatabase( inDbName as String ) as Boolean
Parameters:
- inDbName - The name of a database.
Description:
If you want to remove a database from the scope of the VServer, you should remove the record associated with this database from the Master Database. You can do this using this method.
Errors:
- Database Name not found.
Example:
server.UnregisterDatabase( "Accounting" )
VServer.RegisterProject()
Declaration:
RegisterProject( inProjectName as String, inServerFullPath as String = "" )
Parameters:
- inProjectName - The name of the Project.
- inServerFullPath - The full path of the Project located on the server computer.
Description:
You can use this method to register in Vserver an existing Project. This command adds a new record to the Master Database.
Usually you just should drop a project into the directory pointed to by the .ini variable “SystemProjectCatalog”, and call this method specifying only the name of the project. If the project was placed outside this directory then you should specify the full path to the project on the server computer.
Note: For the MacOS X version of Valentina Server, use a UNIX-style path.
Errors:
- The Project Name already exists.
Example:
This assumes that a Project with name “ProjName” or “ProjName.vdb” exists in the “Projects” folder of VServer.
server.RegisterProject( "ProjName" )
Example:
server.RegisterProject( "Accounting", "C:\SomeCompany\account2002.vsp" )
VServer.UnregisterProject()
Declaration:
UnregisterProject( inProjectName as String ) as Boolean
Parameters:
- inProjectName - The name of a Project.
Description:
If you want to remove a project from the scope of a VServer, you should remove the record associated with this project from the Master Database. You can do this using this method.
Errors:
- Project Name not found.
Example:
server.UnregisterProject( "Accounting" )