Ignition sql tag result is different from SQL server side

i do the sql query in the server side,
i can see the result is

i can use python decode(‘hex’) make it works

but i found if i use sql tag , the result is not the same


why my sql tag is totally different from the result in the sql side?

What’s the actual data type of the column you’re returning?
It looks like the JDBC driver or Ignition is automatically coercing it into a different, string-based encoding.

your guess is right, if i set the query tag is string or text , it is what my picture shows
after i check my SQL server side, i found the DataType is binary

but if i set the tag to Binary Data, it shows connect bad.
how to make the query result the same as what i have done in the sql server side?

It looks like returning base64 to me. Can you check what you get when you execute the following code on the returned string in Ignition?

import base64
1 Like

it works thanks a lot

1 Like