Write to client memory tag fails in tag event, yet succeeds in client timer event

Tag events, as part of a tag, do not belong to any project, and so have no "default database". All database operations in a global gateway context must specify which database connection to use.
There are three contexts that a programmer must consider when using Ignition:

  1. Client/designer context. Client tags, global jython variables, windows, and component all exist independently in each client. Gateway tags can trigger project-specific client events, which can use both project.* and shared.* scripts. Database operations use the project's default connection if none specified, and gateway tag operations use the project's default provider.
  2. Gateway project context. Project-specific gateway events and transaction groups exist here. Client tags, windows, and components do not exist. Tag change scripts and other events in this context can use both project.* and shared.* scripts. Database operations in these scripts use the project's default connection if none specified, and gateway tag operations use the project's default provider.
  3. Gateway global aka shared context. Tag events exist here. Client tags, windows, and components do not exist. Only shared.* scripts are accessible. All database operations must specify a connection. All other tag operations must specify a provider.