Re: Verify Execute

From: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Verify Execute
Date: 2008-06-24 19:40:01
Message-ID: 200806242140.01597.andreak@officenet.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tuesday 24 June 2008 17:18:22 Shavonne Marietta Wijesinghe wrote:
> Hello
>
> Is there a way to find out if the EXECUTE of a UPDATE, INSERT has been completed successfully?
>
> Here is an example of what I do:
>
> Set conn = Server.CreateObject("ADODB.Connection")
> conn.Open "Form_Store_PSQL"
>
> Set oRs = Server.CreateObject("ADODB.Recordset" )
> strSQL = "INSERT INTO TABLE_TEMP (ID) VALUES ('1')"
> conn.Execute strSQL

If no Exception is thrown, the execution of the query was successfull.
Note that usually INSERT, UPDATE and DELETE return an integer > 0, indicating affected rows, but not always. There might be 0 affected rows, which is not nessesarily an error.

--
Andreas Joseph Krogh <andreak(at)officenet(dot)no>
Senior Software Developer / Manager
------------------------+---------------------------------------------+
OfficeNet AS | The most difficult thing in the world is to |
Karenslyst Allé 11 | know how to do a thing and to watch |
PO. Box 529 Skøyen | somebody else doing it wrong, without |
0214 Oslo | comment. |
NORWAY | |
Tlf: +47 24 15 38 90 | |
Fax: +47 24 15 38 91 | |
Mobile: +47 909 56 963 | |
------------------------+---------------------------------------------+

In response to

  • Verify Execute at 2008-06-24 15:18:22 from Shavonne Marietta Wijesinghe

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Crawford 2008-06-24 20:53:48 Sequential event query
Previous Message Shavonne Marietta Wijesinghe 2008-06-24 15:18:22 Verify Execute