Page 1 of 1
[PostgreSQL] String concatenation result is memo
Posted: Fri 09 Jan 2009 14:11
by Thomas J.
Hello support,
SELECT *, c_name || ', ' || c_vorname AS Name FROM t_user
c_name and c_vorname is type STRING and result is with TUniQuery MEMO.
Thanks for your help
Thomas
Posted: Mon 12 Jan 2009 09:03
by Plash
PostgreSQL server returns VARCHAR field with undefined length in such case. TStringField requires setting its Size property. So we don't use TStringField, and use TMemoField.
You can set the UnknownAsString option in SpecificOptions to True. In this case UniDAC creates TStringField with fixed size 8192 for such fields.
Posted: Mon 12 Jan 2009 10:34
by Thomas J.
Sorry but also this is not working.
I set the parameter to true and open the dataset. But in your data editor is for all rows (MEMO) and no sting.
Also at runtime the same problem.
Thanks for your help
Thomas
Posted: Tue 13 Jan 2009 09:07
by Plash
PostgreSQL returns fields of type TEXT for your query which is always mapped on TMemoField.
You should change your query like the following:
Code: Select all
SELECT *, (c_name || ', ' || c_vorname)::varchar(100) AS Name FROM t_user