# Perspective Workstation architecture question

**URL:** <https://forum.inductiveautomation.com/t/perspective-workstation-architecture-question/59480>\
**Category:** General Discussion\
**Tags:** ignition81, perspective\
**Created:** [May 11, 2022, 9:15pm UTC](https://forum.inductiveautomation.com/t/perspective-workstation-architecture-question/59480 "2022-05-11T21:15:58Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 13, 2022, 8:02pm UTC](https://forum.inductiveautomation.com/t/perspective-workstation-architecture-question/59480/24 "2022-05-13T20:02:58Z")

</div>

Quick question regarding this. I ran into this a few days ago here:

> [@Writing back to a database](https://forum.inductiveautomation.com/t/writing-back-to-a-database/59359/8):
>
> The biggest difference is that scripts in perspective run in a Gateway scope. When you run some functions like system.db.runPrepUpdate in Gateway scope you will need to provide additional information. In this instance what database connection to run the query against. When running in a vision client, if you don’t provide the database connection, then the default connection is assumed. Thus the script works in a vision client, but not in perspective. See the syntax section on this page in t…

Where the manual says, in this case that `system.db.runPrepQuery` will use the same function signature as you would use in a Vision Client scope, when in Perspective Session Scope. Yet there is no way that I am aware of to set a default DB for a perspective session, and since "all" scripts run in the Gateway I would expect that Gateway Scope is always required.

Is this a difference with Perspective Workstation (I've never personally used it) and that is what Perspective Session scope means, or is the manual just a tad misleading?

---

_[View the full topic](https://forum.inductiveautomation.com/t/perspective-workstation-architecture-question/59480)._
