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

**URL:** <https://forum.inductiveautomation.com/t/write-to-client-memory-tag-fails-in-tag-event-yet-succeeds-in-client-timer-event/16048>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 19, 2017, 3:57am UTC](https://forum.inductiveautomation.com/t/write-to-client-memory-tag-fails-in-tag-event-yet-succeeds-in-client-timer-event/16048 "2017-11-19T03:57:54Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 20, 2017, 12:04am UTC](https://forum.inductiveautomation.com/t/write-to-client-memory-tag-fails-in-tag-event-yet-succeeds-in-client-timer-event/16048/4 "2017-11-20T00:04:42Z")

</div>

> [@YouCanCallMeGeorge](#):
>
> Surprising because the database connection is in the gateway.

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.

---

_[View the full topic](https://forum.inductiveautomation.com/t/write-to-client-memory-tag-fails-in-tag-event-yet-succeeds-in-client-timer-event/16048)._
