Skip site navigation (1) Skip section navigation (2)

Fw: Re: [webmaster] Question

From: Fernando Fernández <ffernandez(at)aircomp(dot)aero>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Fw: Re: [webmaster] Question
Date: 2004-11-15 07:49:31
Message-ID: 002801c4cae7$a45dbfc0$2600a8c0@inf1 (view raw or flat)
Thread:
Lists: pgsql-novice
----- Original Message -----
From: "Fernando Fernández" <ffernandez(at)aircomp(dot)aero>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Monday, November 15, 2004 8:17 AM
Subject: Re: Re: [webmaster] Question


> Ok :))
>
> I am developing a Windows application, under NT 4 version.
> I am connecting to database throught ODBC (I had installed postgreSQL
> drivers)
> My database version... mmm... I am not sure, but I think 7.4.2 version
> I am programing in Visual FoxPro 8.0, but this information is not
important
> I think.
>
> In sql i can do something like this::
>     begin transaction
>         Update .... where clave= @clave
>         IF @@error= 0  and @@rowcount= 0
>             Insert ... ( @clave, .... )
>     commit transaction
>
> I don't know wether "@@rowcount" exists in postgreSQL
> Thanks you in general and in special to this "someone" that will be happy
to
> give me some help.
>
> >From Palma de Mallorca
> Fernando
>
>
>
> ----- Original Message -----
> From: "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>
> To: "Fernando Fernández" <ffernandez(at)aircomp(dot)aero>
> Cc: <webmaster(at)postgresql(dot)org>
> Sent: Friday, November 12, 2004 4:11 PM
> Subject: Re: [webmaster] Question
>
>
> On Fri, 2004-11-12 at 07:34, Fernando Fernández wrote:
> > Hi :))
> > I am Fernando, from Mallorca - Spain
> >
> > I am using PostgreSQL for my databases. Everything is going all right,
> > but now i need in my application to know how many records has updated an
> > update command.
> >
> > I know I can do something like:
> > SELECT COUNT(*) AS xCount FROM ...
> > IF xCount = 0
> >     INSERT ...
> > ELSE
> >     UPDATE ...
> > ENDIF
> >
> > but I would like do something like:
> > UPDATE ...
> > IF records_updated = 0
> >     INSERT
> > ENDIF
> >
> > is it possible?
>
> Yes, this is certainly possible, but there's no way we can explain it to
> you without knowing some details of your work environment. Please send
> an email to either pgsql-novice(at)postgresql(dot)org or
> pgsql-general(at)postgresql(dot)org that includes some details of your
> programming environment (pl language, php, C, whatever; database
> version; any driver layers involved) and someone will be happy to give
> you some more detailed help.
>
> Robert Treat
> --
> Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
>
>
>


pgsql-novice by date

Next:From: sarlav kumarDate: 2004-11-15 14:47:33
Subject: upgrade from postgres 7.3.2
Previous:From: Ted KaczmarekDate: 2004-11-14 13:21:48
Subject: slony-I rpm

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group