Path: utzoo!attcan!darkover!seachg!jalsop From: jalsop@seachg.UUCP (John Alsop) Newsgroups: comp.databases Subject: Re: Oracle Forms question Keywords: Oracle, SQL-Forms, update, insert Message-ID: <188@seachg.UUCP> Date: 6 Feb 90 23:48:55 GMT References: <326@sfc.Wichita.NCR.COM> Reply-To: jalsop@seachg.UUCP (John Alsop) Organization: Sea Change Corporation, Mississauga, Ontario, Canada Lines: 33 In article <326@sfc.Wichita.NCR.COM> chas@sfc.Wichita.NCR.COM (Charles Binford) writes: >I am running Oracle 5.1 and have a question on how to perform something >in my form. > >How do I know if I am in UPDATE or INSERT mode? I have thought about >a trigger on the query key which would set a global.variable. But, what >about when the user's query returns 5 records, he arrows down to the >6th (blank) record and *inserts* a new record. What trigger can I set >to tell me this is an insert and not an update? > >Charles Binford, Automation Engineering, NCR E&M Wichita In a similar situation, I distinguished between the two cases by checking whether one of the database fields was empty. It woud be non-empty if the record has been retrieved from the database, and would be empty if it had been cleared by the KEY-CREREC operation. -- John Alsop Sea Change Corporation 1100 Central Parkway W., Suite 38 Mississauga, Ontario, Canada L5C 4E5 Tel: 416-272-3881 Fax: 416-272-1555 UUCP: ...!uunet!attcan!darkover!seachg!jalsop -- John Alsop Sea Change Corporation 1100 Central Parkway W., Suite 38 Mississauga, Ontario, Canada L5C 4E5 Tel: 416-272-3881 Fax: 416-272-1555 UUCP: ...!uunet!attcan!darkover!seachg!jalsop