# What is wrong with my DB path? GW DB valid, Query error

**URL:** <https://forum.inductiveautomation.com/t/what-is-wrong-with-my-db-path-gw-db-valid-query-error/61760>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [July 11, 2022, 9:18pm UTC](https://forum.inductiveautomation.com/t/what-is-wrong-with-my-db-path-gw-db-valid-query-error/61760 "2022-07-11T21:18:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roger\_Weidling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/roger_weidling/32/36592_2.png) [@Roger\_Weidling](https://forum.inductiveautomation.com/u/Roger_Weidling)\
**Post date:** [July 11, 2022, 9:18pm UTC](https://forum.inductiveautomation.com/t/what-is-wrong-with-my-db-path-gw-db-valid-query-error/61760/1 "2022-07-11T21:18:49Z")

</div>

I am connecting to a SQLite DB in folder c:\documents\SQLite\xyz.db  
Gateway says connection is valid, but query tag give error:  
Error\_ExpressionEval(“[SQLITE\_ERROR] SQL error or missing database (no such table: states)”)

When copy the DB to the same folder as the sample DB and create a connection there it works.  
What do I need to change to get a different path to work for the query tag to work?

Thanks,  
Sting

---

<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:** [July 12, 2022, 12:56am UTC](https://forum.inductiveautomation.com/t/what-is-wrong-with-my-db-path-gw-db-valid-query-error/61760/2 "2022-07-12T00:56:08Z")

</div>

Sounds like you need permissions for the gateway service to access the folder. (The gateway runs as a service–it doesn’t have the privileges of a user on its desktop.)

---

<div class="post-metadata">

**Author:** ![Roger\_Weidling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/roger_weidling/32/36592_2.png) [@Roger\_Weidling](https://forum.inductiveautomation.com/u/Roger_Weidling)\
**Post date:** [July 16, 2022, 8:50pm UTC](https://forum.inductiveautomation.com/t/what-is-wrong-with-my-db-path-gw-db-valid-query-error/61760/3 "2022-07-16T20:50:18Z")

</div>

Thanks for the reply. It ended up that I did not have the full windows file path. Windows was showing me the “shortcut” path. Once entered the full path it found it.
