Menu

#40 RxDBGrid, sorting, Postgresql mixed-case fieldnames should be enclosed with double quotes

v1.0 (example)
open
nobody
sort (1)
5
2020-04-10
2020-04-10
No

Using rxdbgrid in CodeTyphon 7.10. Sorting for Postgresql database dataset with TSQLQuery is not working properly if field name contains mixed cases (lower and upper cases), because then fields names should be enclosed with double quotes.
I have temporarily solved this in unit exsortsql, in procedure TSQLQuerySortEngine.SortList, by replacing S:=S + ListField; with the S:=S + AnsiQuotedStr(ListField,'"');

Discussion

  • Zlatko Matić

    Zlatko Matić - 2020-04-10

    If I was not clear enough, I am talking about RxDBGrid's rdgAllowSortForm option.

     
  • Zlatko Matić

    Zlatko Matić - 2020-04-10

    Additionaly, it fails also if in the SQL.Text property of an TSQLQuery there was an "order by" expression defined in design time.

     

Log in to post a comment.