X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id ADBA5D1DA57 for ; Thu, 28 Aug 2003 12:15:27 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 04135-10 for ; Thu, 28 Aug 2003 09:14:58 -0300 (ADT) Received: from kogut2.o2.pl (kogut2.o2.pl [212.126.20.58]) by svr1.postgresql.org (Postfix) with ESMTP id 2D2D4D1D9D9 for ; Thu, 28 Aug 2003 09:14:55 -0300 (ADT) Received: from daniel (mx0.helion.pl [213.216.84.147]) by kogut2.o2.pl (Postfix) with ESMTP id 1E4C772BE3; Thu, 28 Aug 2003 14:14:52 +0200 (CEST) Message-ID: <200308281414380935.01025881@smtp.o2.pl> In-Reply-To: <1bb201c36d51$2728f500$ea00a8c0@yudha> References: <002301c36d3d$baf7f1f0$2601a8c0@gliwice.helion.com.pl> <1bb201c36d51$2728f500$ea00a8c0@yudha> X-Mailer: Calypso Version 3.30.00.00 (1) Date: Thu, 28 Aug 2003 14:14:38 +0200 From: "Daniel" To: "Yudha Setiawan" Cc: pgsql-sql@postgresql.org Subject: Re: lock row in table Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/341 X-Sequence-Number: 14957 Hi, No, I am sure that I can get this message from Delphi. Check it on web site= www.microolap.com For example when I try to put a non-unique value in a primary key I get me= ssage from database that I get conflict with primary key :-) of course I use raise ... except ... but everything work perfectly... erro= r handling works correctly :-) so I am waiting for an answer for my question how check that the rekord is = currently edited, Greetings, Daniel > > >*********** REPLY SEPARATOR *********** > >On 2003-08-28 at 17:42 Yudha Setiawan wrote: > >Of course I can lock record with syntax >"Begin; > select * from table1 where ID=3D12 for update; > update table1 set field1=3D"New value" where ID=3D12; >commit;" >but I can not to inform other user that the record is edited? > >MAIN TARGET: >How to get information that current record is edited? Which function can I >use? > >* as long as i know, the only message you could create is just >* raise notice 'ur_message'; or raise exception 'ur_error_message'; >* and the only message that delphi could read is just raise exception. > >* And if you wanna make your own message, perhaps you must using try and >except >* and you could give your own message via ShowMessage('ur_message') or >other >* Class object on delphi. > > >Please help me, Maybe someone have similar problem? >Greetings, >Daniel > >Hope it Help, GOD Bless You and Bravo PostgreSQL.