Understanding TPgQuery and TPgUpdateSQL

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
[email protected]
Posts: 5
Joined: Tue 12 Jan 2010 01:03

Understanding TPgQuery and TPgUpdateSQL

Post by [email protected] » Fri 22 Jan 2010 22:43

I'm having trouble trouble grasping how to use TPgQuery and TPgUpdateSQL. I have an edit form, using non-data aware components to edit a single row. The form has the "typical" add, edit and delete buttons.

I'm see how to load the Params and set TPgQuery.SQL with a select query to retrieve the selected record. I can load the SQLDelete, SQLInsert and SQLUPdate with the relevent queries. What I cannot find is execute those specific queries.

I've looked at the Demo code but that appears tied into editing with a Grid. Is there a very high level explanation of the procedures that need to be followed?

Thanks.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 25 Jan 2010 08:39

Use the Edit/Post, Insert/Post, and Delete methods of TPgQuery. TPgQuery executes specified SQL statements automatically on these methods.

[email protected]
Posts: 5
Joined: Tue 12 Jan 2010 01:03

Post by [email protected] » Tue 26 Jan 2010 02:23

Thank you.

Post Reply