# Error connector postgres

**URL:** <https://community.ofelia.com/t/error-connector-postgres/4618>\
**Category:** Q&A\
**Created:** [28 May 2014 13:08 UTC](https://community.ofelia.com/t/error-connector-postgres/4618 "2014-05-28T13:08:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kekamayara87](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@kekamayara87](https://community.ofelia.com/u/kekamayara87)\
**Post date:** [28 May 2014 13:08 UTC](https://community.ofelia.com/t/error-connector-postgres/4618/1 "2014-05-28T13:08:46Z")

</div>

I have a text field that I inform a number, this field has a validator that checks if the protocol there .  
are two forms within an activity .  
The first form we inform the protocol .  
The second has a table with a connector database . Within this connector has a variable of type text that keeps the number that was  
entered in the first form .

My query is :  
SELECT “adm\_pgeatv120002”.“assistidos”.“nome”, “adm\_pgeatv120002”.“assistidos”.“cpf”,  
“adm\_portal\_digital”.“processos”.“numero”  
FROM  
“adm\_pgeatv120002”.“assistidos” JOIN “adm\_portal\_digital”.“processos” ON “adm\_pgeatv120002”.“assistidos”.“processo\_eid” = “adm\_portal\_digital”.“processos”.“id”  
WHERE “adm\_portal\_digital”.“processos”.“numero” = ‘${protocoloNumero}’  
AND “adm\_pgeatv120002”.“assistidos”.“ativo\_processo” = “true”  
AND “adm\_pgeatv120002”.“assistidos”.“tipo\_assistido” = ‘Requerente’  
ORDER BY “adm\_pgeatv120002”.“assistidos”.“nome”, “adm\_pgeatv120002”.“assistidos”.“cpf”, “adm\_portal\_digital”.“processos”.“numero”

Run to the following error occurs:  
Error while executing the connector database-postgresql92 version 1.0.0

‘${protocoloNumero}’ is the name of my variable that stores the number that the user types in the text field.

The connector does not recognize and give the following error:  
Error while executing the connector database postgresql92-version 1.0.0

When I put a fixed number, it works.  
Recalling that the connector is created in the widget inside a table.

Please help me…

Bonita BPM 6.2.3  
Postgres 9.2

---

<div class="post-metadata">

**Author:** ![aCordier](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@aCordier](https://community.ofelia.com/u/aCordier)\
**Post date:** [29 May 2014 13:29 UTC](https://community.ofelia.com/t/error-connector-postgres/4618/2 "2014-05-29T13:29:48Z")

</div>

Hello,

One way to solve this issue is to enter groovy editor (switch editor may be required depending on your version), name the script if you’re using a v6.\*\*\* and then return your request as a string concatenated to your variable.

eg:

`
def reqBuilder = new StringBuilder()
reqBuilder.append("UPDATE myTable SET myCol = '")
reqBuilder.append(myBonitaVariable)
reqBuilder.append("' WHERE myCol = 'oldValueToUpdate';")
reqBuilder.toString()
`

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [28 May 2014 14:58 UTC](https://community.ofelia.com/t/error-connector-postgres/4618/3 "2014-05-28T14:58:25Z")

</div>

hello, could you please edit your question and add information about the version of Bonita BPM, and more ?

---

<div class="post-metadata">

**Author:** ![kekamayara87](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@kekamayara87](https://community.ofelia.com/u/kekamayara87)\
**Post date:** [29 May 2014 12:40 UTC](https://community.ofelia.com/t/error-connector-postgres/4618/4 "2014-05-29T12:40:07Z")

</div>

Please help me…

---

<div class="post-metadata">

**Author:** ![aCordier](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@aCordier](https://community.ofelia.com/u/aCordier)\
**Post date:** [29 May 2014 13:29 UTC](https://community.ofelia.com/t/error-connector-postgres/4618/5 "2014-05-29T13:29:11Z")

</div>

Notice that ${…} is not required here

---

<div class="post-metadata">

**Author:** ![aCordier](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@aCordier](https://community.ofelia.com/u/aCordier)\
**Post date:** [29 May 2014 13:30 UTC](https://community.ofelia.com/t/error-connector-postgres/4618/6 "2014-05-29T13:30:24Z")

</div>

Turned to and anwser
