How to query a MySQL database from Workflow

We’re trying to use the Database query plugin to read a counter value from a MySQL reference table and then update the table to increment the counter (AWB number).

However it seems there is no way to create a DSN for mysql event though we’ve installed mysql ODBC connector.
Is Mysql DB connection supported by PresConnect? is there another way to achieve this?

You have to create an ODBC-32 DSN because PReS Workflow is a 32 bit application. Once you have created that DSN, then DBQuery plugin will be able to use it.

Hi,

this work’s for me:

I use the Dynamic SQL tab.
Select “Use dynamic values at runtime” and unselect “Expect record set”.
Click on the right icon to generate a new connection.
A new windows appears and here you create a new computer data source.

Select the MYSQL ODBC driver:

Click on next and the MYSQL Connector open. Here you can create your connection and
choose your database you want to retrieve:

After that you can use the SQL statements to retrieve or send data to your database:

sql

Don’t forget to set the right emulation on the first tab, that work’s for you:

Hope that helped!

Thanks Phil, indeed it was indeed because we were using the 64-bit version of the ODBC mySQL connector.
We will now play a bit with DBQuery (as per Chris instructions) and Javascripts to see how this works.

@Chris @Phil

Thank you both for pointing us in the right direction!
We`ll give it a go!

Cheers,
Fsh22