Re: catch SQLException, error code for Foeign key violation,

From: Kris Jurka <books(at)ejurka(dot)com>
To: "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: catch SQLException, error code for Foeign key violation,
Date: 2006-04-19 06:42:28
Message-ID: Pine.BSO.4.63.0604190141510.14912@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 19 Apr 2006, surabhi.ahuja wrote:

> what is the way to capture such exception in Cpp,
> are there any examples available for this?
>
> right now in cpp, i do this
>
> rStatus = PQresultStatus(result);
>
> but what is the specific error code, how to get that,
>

See PQresultErrorField

http://www.postgresql.org/docs/8.1/static/libpq-exec.html

Kris Jurka

In response to

Browse pgsql-general by date

  From Date Subject
Next Message jayati.biswas 2006-04-19 07:03:06 recovery problem
Previous Message surabhi.ahuja 2006-04-19 06:32:54 Re: catch SQLException, error code for Foeign key violation,