Cannot read correctly a string of bytes from a text field
Posted: Tue 05 Nov 2013 10:00
In a text field I put a string of ASCII (an custom encrypted string) and I tried to read with a simple PgQuery,
"select 'field' from 'table' where 'keyfield'='key'",
but no matter the type of field I cast it (TBinaryField, TByteField etc), it returns a different string, each time the same length and content.
When executing the query in pgAdmin it return the correct string.
More, if I put a text in that field, even a large one (287k), the query reads correctly, so I think the problem is how the PgDAC is interpreting the content when the field contains control characters.
How can I bypass the issue?
Thank you,
Radu B.
"select 'field' from 'table' where 'keyfield'='key'",
but no matter the type of field I cast it (TBinaryField, TByteField etc), it returns a different string, each time the same length and content.
When executing the query in pgAdmin it return the correct string.
More, if I put a text in that field, even a large one (287k), the query reads correctly, so I think the problem is how the PgDAC is interpreting the content when the field contains control characters.
How can I bypass the issue?
Thank you,
Radu B.