In almost every case I’ve seen that error it’s because I was trying to work with an object (like an array) directly rather than with the value in the first “element” of the object.
If this is code that YOU wrote, then just specify that you want to use the first element.
For example, rather than: If myVar = “foobar” then …
You simply need to say: If myVar(0) = “foobar” then …
Give this a shot … it’ll probably resolve the problem you’re having.
However, if this is code that somebody else wrote, then you’ll need to report it to the developer. (Or, perhaps you just need to re-apply the DB’s design template to your DB to refresh all of its design elements.)