[Lazarus] PostgreSQL database connection error

Vincent Snijders vsnijders at quicknet.nl
Sat May 31 22:29:41 CEST 2008


peng schreef:
> Look ScreenPrint.

Next time, please paste source code: that is easier to copy.

remvoe the line procedure TSQLConnection.ExecuteDirect ...

after the begin a line later add
  PQConnection1.ExecuteDirect('set client_encoding to ''gbk'');

Vincent

> 
> 2008/5/30 peng <pengtu321 at gmail.com <mailto:pengtu321 at gmail.com>>:
> 
>     Thanks for your answer, but I do not know how to set up
>     TSQLConnection.ExecuteDirect (......).
>     TSQLConnnection components in the election, I can not find
>     ExecuteDirect attributes. Can give me concrete steps ? I am still a
>     novice Lazarus, thank you!
>     --
>     2008/5/30 Joost van der Sluis <joost at cnoc.nl <mailto:joost at cnoc.nl>>:
> 
>         You should first set the client_encoding with
>         'TSQLConnection.ExecuteDirect('set client_encoding to ''gbk'');'
>         Then you can open your query. (Note that you can only change the
>         sql-statement of an query when it's closed)
>         Joost.
> 
> 



More information about the Lazarus mailing list