# Database Access from Client Issue

**URL:** <https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396>\
**Category:** Ignition Early Access\
**Created:** [February 18, 2020, 9:20pm UTC](https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396 "2020-02-18T21:20:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlnims](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jlnims](https://forum.inductiveautomation.com/u/jlnims)\
**Post date:** [February 18, 2020, 9:20pm UTC](https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396/1 "2020-02-18T21:20:28Z")

</div>

Hello folks!

I looked around a bit to see if this was already being discussed, but did not find anything. Here’s the issue: I have a valid connection to a Postgres relational database. In designer, I can access the table within and place the values into a table in a window. But when I launch a client of that design, the client cannot (will not) display the values.

What might I be missing?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 18, 2020, 9:29pm UTC](https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396/2 "2020-02-18T21:29:17Z")

</div>

Where and how are you accessing the table? If you’re doing anything with scripting, you need to look at the scope which is being used. The Designer will always have a “gateway” scope, whereas Clients (Vision) have client scopes. Perspective Sessions have “gateway” scope because their scripts are all run on the Gateway, instead of the local client.

---

<div class="post-metadata">

**Author:** ![jlnims](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jlnims](https://forum.inductiveautomation.com/u/jlnims)\
**Post date:** [February 18, 2020, 9:38pm UTC](https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396/3 "2020-02-18T21:38:57Z")

</div>

Oh! I did not realize the two were separate. Is there a quick fix so the client sees the data?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 18, 2020, 9:43pm UTC](https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396/4 "2020-02-18T21:43:55Z")

</div>

As I said, it depends on _how_ you’re accessing the data. Could you provide a screenshot or some more details regarding an instance where you’re not seeing the data in the client?

Here is an example in the [documentation](https://docs.inductiveautomation.com/display/DOC80/system.db.runNamedQuery) of a scripting function which has two different scopes available to it. If you are using scripting, please verify the function you are using is being used in the correct scope.

if you’re using a binding, scopes should not be an issue (we handle them for you), so I would need some more insight into what you’re doing to help you further.

---

<div class="post-metadata">

**Author:** ![jlnims](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jlnims](https://forum.inductiveautomation.com/u/jlnims)\
**Post date:** [February 18, 2020, 10:00pm UTC](https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396/5 "2020-02-18T22:00:21Z")

</div>

Thanks. Interesting, but I believe this is a binding. It’s a very simple query:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a716b1b12500b39874d7a972412513551d8860b2.png)

Am I correct?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 18, 2020, 10:11pm UTC](https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396/6 "2020-02-18T22:11:39Z")

</div>

If you’re using a pure SQL Query binding (as opposed to a Named Query binding), you need to enable permissions at the project level.

1. In the Designer’s menu, select Project \> Project Properties.
2. Now locate Vision \> Permissions in the table to the left.
3. Enable “Legacy Database Access”.
4. You can also specify roles if required while you are here.
5. Click OK to apply your changes.
6. Save the project.

---

<div class="post-metadata">

**Author:** ![jlnims](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jlnims](https://forum.inductiveautomation.com/u/jlnims)\
**Post date:** [February 18, 2020, 10:16pm UTC](https://forum.inductiveautomation.com/t/database-access-from-client-issue/32396/7 "2020-02-18T22:16:27Z")

</div>

cmallonee: That did it! Many thanks for the help!
