How can I modify a table in a Postgres db?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
[email protected]
Posts: 14
Joined: Mon 21 Jun 2010 13:55

How can I modify a table in a Postgres db?

Post by [email protected] » Tue 22 Jun 2010 11:38

I've C++ Builder 2010 and PgDAC bought yesterday.
I've done a project with a:
TPgConnection
TPgQuery
TDataSource
TDBGrid
TDBNavigator.

I've setted all the parameter and so I see all the record of a table into the DBGrid. At running time I modify a field of the table into the DBGrid, then with DBNavigator Post the modify but when I reopen the table there is always the same value. Why?
The problem is very simple, probably I've to set something, but what?

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Thu 24 Jun 2010 14:51

Hello

Record can be not saved to a database in the following cases:
1. If the AutoCommit property of TPgQuery (or TPgTable) is False and you don't call the Commit method of TPgConnection
2. If you set the CachedUpdates property of TPgQuery (or TPgTable) to True and don't call the ApplyUpdates method. If the AutoCommit property is False, then you should call the Commit method also.
3. Maybe your query is too complex and PgDAC cannot generate the update query automatically

Please provide us your query and DDL script for creating the tables that are used in your query.

[email protected]
Posts: 14
Joined: Mon 21 Jun 2010 13:55

Post by [email protected] » Fri 25 Jun 2010 09:17

I've sent the replay to [email protected] and [email protected]

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 29 Jun 2010 11:14

I sent answer by E-mail.

[email protected]
Posts: 14
Joined: Mon 21 Jun 2010 13:55

Post by [email protected] » Thu 01 Jul 2010 11:53

I've found the problem in my application. There is a field, in my table, named 'user' that give me the error in the INSERT and UPDATE procedure.

Thanks for the Help
Fabio

Post Reply