Weird client tag behavior in Vision 8.0.5

Hey guys,

I’m trying to move an old project from Ignition 7.7 to Ignition 8.0.5. I’m aware there are still some issues with Client Tags (e.g. not able to copy, etc.) But I’ve been seeing some weird behavior. I’m not sure if something has changed for Client tags or if it’s a bug.

The project is an old recipe system for some VFD’s we have in our test area. I’ve re-created the client tags. These tags are meant to load a value from a database based on a selected recipe. They are also editable fields and can save and create new recipes. At the designer level, I’ve made all the changes necessary and made some tests and the project seems to work. But the moment I run the project it stops working, See images below, in designer and running:

working

notworking

There are other fields, but those are Modbus->MQTT and they work fine, the dropdown seems to work also, but it doesn’t change the values and it’s also giving a db error for some reason, even though the query seems to work.

Any ideas?

The error icon is the database symbol. Have you converted to named queries? If not, you need to enable legacy DB access in the project’s security permissions. (This would have been true moving to 7.9, too.)

1 Like

Huh… Interesting, I was not aware this had changed… I’ve been working with Ignition 8 for more than 6 months, but it’s the first project I try to migrate from an old version, I’ve mostly been working with Perspective. Thanks for the tip!

A couple of questions though:

  • This fixed one of my issues, but enabling legacy db access in the project does not affect how sql client tags work. Is there any way to enable legacy db access on client tags? and,
  • What was the reasoning behind this change? I see how namedQueries are easier in some aspects, but I remember how using and controlling transactions (rollbacks and such) from scripts was quite handy, what would replace this function in namedQueries? (I haven’t looked too much into this, but with what I’ve done it doesn’t seem straight forward to do)

Huh. Hadn’t seen that client tags weren’t included in that setting. (I don’t use queries on client tags often, so no surprise there.)

Named queries haven’t supported this until very recently (in v8).

1 Like

Security. “Legacy” DB access means that anything that gets through the authorization process can run any SQL query they want to on the database, under whatever access Ignition’s been granted on the DB. Named queries safeguard against that by restricting to a single possible SQL query with proper parameterization.

1 Like

If you need to construct queries dynamically, and want to keep security tight, you can use a gateway message handler to do so and return the dataset to the caller. (Via system.util.sendRequest().) If you do so, make sure that the dynamic parts of the query structure are built without using any strings from the client–that would re-introduce the very security problem the restrictions aim to solve.

2 Likes

Thanks for your replies guys! This clarifies things, now I just need to figure out how to get the Client tags to use queries, or find a workaround.

Just to clarify, for some reason the Client tag queries seem to be working now in running mode… I didn’t change anything since yesterday so I can’t say why it’s working now… maybe it didn’t assimilate the project setting yesterday?