# Contact Info Query fails for AD/DB Hybrid user source

**URL:** <https://forum.inductiveautomation.com/t/contact-info-query-fails-for-ad-db-hybrid-user-source/6413>\
**Category:** Ignition\
**Created:** [May 8, 2013, 2:27pm UTC](https://forum.inductiveautomation.com/t/contact-info-query-fails-for-ad-db-hybrid-user-source/6413 "2013-05-08T14:27:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [May 8, 2013, 2:27pm UTC](https://forum.inductiveautomation.com/t/contact-info-query-fails-for-ad-db-hybrid-user-source/6413/1 "2013-05-08T14:27:33Z")

</div>

I tried to test e-mail notification but somehow i don't find the right query to fetch the contact information.

The logged error is:

> [@](#):
>
> INFO | jvm 1 | 2013/05/08 16:17:58 | WARN [AD\_DB\_Hybrid] [16:17:57,980]: [profileName=AD Lokal Test] Contact info query didn't return enough columns. Expected: Type (string), Value (string)

I tried a couple of queries like:

`
SELECT c.contact_type Type, c.contact_value Value FROM auth_users u, auth_user_ci c WHERE c.id=u.id AND u.username=?
``
SELECT c.contact_type contact_type, c.contact_value contact_value, null as schedule FROM auth_users u, auth_user_ci c WHERE c.id=u.id AND u.username=?
` and every possible combination of this.

I used the database layout provided in the provisional 7.6 manual, exept for a missing schedule table (currently there is no need for schedules).

Is there something i am missing?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 20, 2013, 4:44pm UTC](https://forum.inductiveautomation.com/t/contact-info-query-fails-for-ad-db-hybrid-user-source/6413/2 "2013-05-20T16:44:35Z")

</div>

You should just need the contact type and contact value. The code is also checking for a 3rd column right now because as you guessed this was a leftover from early in the 7.6 beta when schedules were attached to contact info.

The names and types of the columns doesn’t matter. It coerces whatever it gets in the first column to a string (contact type) and whatever it gets in the second column to a string (contact value). I’ll change it for 7.6.1 so that it is only expecting 2 columns. Adding a dummy third column on there should make it work in the meantime…
