Alaska Software Inc. - PostgreSQL how to check if insert, update or delete applied successfully
Username: Password:
AuthorTopic: PostgreSQL how to check if insert, update or delete applied successfully
Martijn WagelaarPostgreSQL how to check if insert, update or delete applied successfully
on Tue, 21 Oct 2014 16:24:07 +0200
Hello,

How to check whether a SQL query with statements like insert, update or 
delete applied there database mutations successfully?

Regards,
Martijn.
Andreas HerdtRe: PostgreSQL how to check if insert, update or delete applied successfully
on Wed, 22 Oct 2014 15:08:49 +0200
Hello Mr Wagelaar,

In case the sql statement executes without error then the insert, update
or delete commands have been successfully executed - the table modifications
have been applied then.

With my best regards,

  Andreas Herdt
  Alaska Software

--------------------------------------------------------------------

Technical Support:      support@alaska-software.com

News Server:            news.alaska-software.com
Homepage:               http://www.alaska-software.com
WebKnowledgeBase:       http://www.alaska-software.com/kbase.shtm

Fax European Office:    +49 (0) 61 96 - 77 99 99 23
Fax US Office:          +1 (646) 218 1281
--------------------------------------------------------------------

"Martijn Wagelaar" wrote in message 
news:762ad0ff$4a08f947$4918b@news.alaska-software.com...
> Hello,
>
> How to check whether a SQL query with statements like insert, update or 
> delete applied there database mutations successfully?
>
> Regards,
> Martijn.
Martijn WagelaarRe: PostgreSQL how to check if insert, update or delete applied successfully
on Tue, 28 Oct 2014 10:17:25 +0100
Hello Andreas,

That is partial true. When the where clause of an update action don’t 
find any match the sql statement executes successfully. But there are no 
records updated.

In the documentation of PostgreSQL 
http://www.postgresql.org/docs/8.3/static/sql-update.html section 
“Outputs” describes this situation. The problem here is that the 
implementation of SQLStatement:execute() don’t give a result. I think 
this should be in line with PostgreSQL and give the result “count” as 
described in the previous link.

Regards,
Martijn.

"Andreas Herdt" schreef op 22-10-2014 om 15:08:
> Hello Mr Wagelaar,
>
> In case the sql statement executes without error then the insert, update
> or delete commands have been successfully executed - the table
> modifications
> have been applied then.
>
> With my best regards,
>
Andreas HerdtRe: PostgreSQL how to check if insert, update or delete applied successfully
on Tue, 28 Oct 2014 11:29:12 +0100
Hello Mr Wagelaar,

Thank you very much for the updated information.

So your question is about the "affected rows" which can be the result
of a statement execution.

As a matter of fact this is not supported yet by the PGDBE, hence it
is on our todo list. Hate to say this, no workaround is available to
lay hands on the number of rows that have been affected by a SQL
statement that UPDATEs, INSERTs or DELETEs rows.

With my best regards,

  Andreas Herdt
  Alaska Software

--------------------------------------------------------------------

Technical Support:      support@alaska-software.com

News Server:            news.alaska-software.com
Homepage:               http://www.alaska-software.com
WebKnowledgeBase:       http://www.alaska-software.com/kbase.shtm

Fax European Office:    +49 (0) 61 96 - 77 99 99 23
Fax US Office:          +1 (646) 218 1281
--------------------------------------------------------------------

"Martijn Wagelaar" wrote in message 
news:3242cf9c$39597309$8769@news.alaska-software.com...
> Hello Andreas,
>
> That is partial true. When the where clause of an update action don’t find 
> any match the sql statement executes successfully. But there are no 
> records updated.
>
> In the documentation of PostgreSQL 
> http://www.postgresql.org/docs/8.3/static/sql-update.html section 
>  “Outputs” describes this situation. The problem here is that the 
> implementation of SQLStatement:execute() don’t give a result. I think this 
> should be in line with PostgreSQL and give the result “count” as described 
> in the previous link.
>
> Regards,
> Martijn.
>
> "Andreas Herdt" schreef op 22-10-2014 om 15:08:
>> Hello Mr Wagelaar,
>>
>> In case the sql statement executes without error then the insert, update
>> or delete commands have been successfully executed - the table
>> modifications
>> have been applied then.
>>
>> With my best regards,
>>
>