Re: Unique Value

From: Rajesh Abhyankar <amatrix_at_hotmail.com>
Date: 1997/07/29
Message-ID: <33DDFBAF.943_at_hotmail.com>#1/1


Vijaya L. Natarajan wrote:
>
> Hi,
> I am developing an application using Developer/2000
> in which I want the user name to be unique.
> For example in my application there cannot another user with
> the same first name and last name.
>
> I can do this by giving a IF Statement in the WHEN-VALIDATE-RECORD
> trigger to check whether there exists a user with the same first
> name and last name before inserting a new record.
>
> But I don't know how to do this during update.
> Is there any idea to accomplish this , please let me know
> my email address is vijayaln_at_cs.uga.edu

it is obvious that your question is related to Forms 4.5 from the dev.2000 suit..

such checks for unique values should essentially be carried out at the server-side.. if u have designed your database with proper primary keys and/or unique constraints (integrity constraints in general), such 'business rules' are automatically taken care of by the server.. infact that is the whole idea behind data integrity!

if u already have this in place and are merely looking for duplicating the check at the client-side, then u can set the 'primary key' property for the 'item' and the owning 'block' to 'true'.. thus Forms will not allow non-unique data to be commited to the database..

-rajesh



note: views expressed here are my own and not those of my employer..
Received on Tue Jul 29 1997 - 00:00:00 CEST

Original text of this message