# Query tag - Database connection error

**URL:** <https://forum.inductiveautomation.com/t/query-tag-database-connection-error/80925>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [October 24, 2023, 5:42pm UTC](https://forum.inductiveautomation.com/t/query-tag-database-connection-error/80925 "2023-10-24T17:42:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjohnson0238](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mjohnson0238](https://forum.inductiveautomation.com/u/mjohnson0238)\
**Post date:** [October 24, 2023, 5:42pm UTC](https://forum.inductiveautomation.com/t/query-tag-database-connection-error/80925/1 "2023-10-24T17:42:11Z")

</div>

I have a query tag that tells me that the database connection is bad, but in the gateway it shows valid and when I run my query in the Database Query Browser I get a return.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c47b92fc4c1d5258dc46ecbf7680e8b5f1b814d4.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e7b26e40fa571401e2f423146aef7fe5ea38efdb.jpeg)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/57a5eb2d7a240a3697b6b5035639c902b355461e.png)

Any ideas on if I am missing something?

---

<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:** [October 24, 2023, 6:42pm UTC](https://forum.inductiveautomation.com/t/query-tag-database-connection-error/80925/2 "2023-10-24T18:42:10Z")

</div>

A query tag would need an explicit database connection name, as it wouldn't have a project default to use. Typo in that, perhaps?

---

<div class="post-metadata">

**Author:** ![mjohnson0238](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mjohnson0238](https://forum.inductiveautomation.com/u/mjohnson0238)\
**Post date:** [October 25, 2023, 6:58pm UTC](https://forum.inductiveautomation.com/t/query-tag-database-connection-error/80925/3 "2023-10-25T18:58:28Z")

</div>

Yeah Im not sure either. I have 2 other query tags config'd the same way and returning results. Until I get it figured, Im just going to run a Gateway scrit writing to a memory tag as a stop gap.

Curiously odd, to say the least.
