TagsDBBeginEdit

This function locks the tags database for editing during run time. You must call this function before you call any other Tags Database functions to add or remove project tags or configure tag properties.

Function Group Execution Windows Embedded Thin Client Mobile Access
TagsDBBeginEdit Tags Database Synchronous Supported (see “Notes” below) Not supported Not supported Not supported

Syntax

  TagsDBBeginEdit()  
Web Studio Help ions tagsdb tagsdbbeginedit.xml d431989e108 TagsDBBeginEdit

This function has no parameters.

Returned value

This function returns one of the following possible values:
Value Description
0 Function executed successfully.
-1 Project runtime is busy; another function is editing the tags database. Try again later.
-2 Invalid number of parameters.
-3 Project runtime is busy; an Alarm or Trend task is using the tags database. Try again later.
-4 The project has Collaboration enabled. To edit the tags database, you must check the tags database files out of source control. For more information, see About collaboration and source control.

Notes

The following restrictions apply to the execution of this function:
  • The function can only be executed on the project server — it cannot be called by a Graphics Script, Screen Script, or Command animation running on a project client; and
  • The function TagsDBEndEdit must be executed when the editing is finished, in order to release the tags database and resume normal run-time operations.

For more information about the Tags Database functions and examples of how to use them, see Edit the tags database during run time.

Please note this function has a persistent effect, which means that if you call the function to lock the tags database during run time and then stop the project, then the database will remain locked and you will not be able to manually edit it.

Restarting the project may or may not unlock the database, depending on how you designed your project and which function call locked the database in the first place. As such, you should use the Database Spy to manually call the function TagsDBEndEdit. When that is executed successfully, you can safely restart your project.

TagsDBBeginEdit