Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
- Posts: 3
- Joined: Wed 04 Mar 2020 15:06
Code: Select all
PgQuery.SQL.Text := 'SELECT * FROM table WHERE field1=:field1';
PgQuery.ParamByName('field1').AsString := '10';
How can I get SQL with replaced parameters?
The component actually replaces the parameters in the SQL, before sending to the server
whether there are property from where it is possible to get: SELECT * FROM table WHERE field1=10
- Devart Team
- Posts: 65
- Joined: Wed 11 Mar 2020 08:28
PgDAC doesn't have a property for replacing the parameters in a SQL statement with actual values.
You may use the TPgSQLMonitor component to monitor which SQL statements are being sent to the server.
PgDAC uses protocol version 3, which assumes sending SQL statements and parameters separately.