Page 1 of 1

Understanding TPgQuery and TPgUpdateSQL

Posted: 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.

Posted: Mon 25 Jan 2010 08:39
by Plash
Use the Edit/Post, Insert/Post, and Delete methods of TPgQuery. TPgQuery executes specified SQL statements automatically on these methods.

Posted: Tue 26 Jan 2010 02:23
Thank you.