Page 1 of 1

TPgQuery: Unexpected server response

Posted: Thu 10 Feb 2011 12:04
by meszarosistvan
TPgQuery fails if the select looks like this:

set enable_sort to off;
select
CATALOG_LINE_ID,
FIELD_2_VALUE
from CATALOG_LINE
where ZERO_CATALOG=false
order by FIELD_2_VALUE

First row causes the error:
Unexpected server response : รพ

It can be solved. Please check it if you have time...

Extra Info

Posted: Thu 10 Feb 2011 12:15
by meszarosistvan
I use PgDac 2.10.0.4

Posted: Fri 11 Feb 2011 09:59
by bork
Hello

I executed the following SQL query and it works correctly:

Code: Select all

begin
  PgConnection1.Open;
  PgConnection1.ExecSQL('set enable_sort to off', []);

  PgQuery1.SQL.Text := 'select * ' +
                       '  from btest0 '+
                       '  where id>1 ' +
                       '  order by name';
  PgQuery1.Open;
end;
Please provide me a SQL script for creating the CATALOG_LINE table. Also please provide delphi code that you are using to execute your query.

Yes...

Posted: Wed 23 Feb 2011 08:44
by meszarosistvan
Hello,

You are absolutely right, I use the same.

Next week we should buy this component (everything is ok). After it, I will test it, and if I got something, I inform you.

Best regards.

Posted: Wed 23 Feb 2011 09:01
by bork
Hello

If any other questions come up, please contact me.