• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: validate the uniqueness of data first before inserting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: validate the uniqueness of data first before inserting


  • Subject: Re: validate the uniqueness of data first before inserting
  • From: Dirk Bajohr <email@hidden>
  • Date: Wed, 16 Jun 2004 12:01:06 +0200

There are two possible ways:
1) don't check for availability, catch and handle the exception if insert fails
2) create a fetch specification and output an error page if the customer_code is already in the database table


You can override validateForInsert(), see http://developer.apple.com/documentation/WebObjects/Reference/API/com/ webobjects/eocontrol/EOValidation.html.

Cheers,
Dirk

Am 16.06.2004 um 11:32 schrieb Goh Keng Boon:

Hi,

I got this field called customer_code which is keyin by user manually and it need to be unique. How can it check if it is unique first
before inserting the whole record into database?


Thanks alot.

KB
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.



--
Dirk Bajohr
iSOLUTION - Individuelle Software fuer moderne Kommunikation

Hauptstr. 50
53757 Sankt Augustin

T +49 2241 921567-0
F +49 2241 921567-89
http://www.isolution.de
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >validate the uniqueness of data first before inserting (From: Goh Keng Boon <email@hidden>)

  • Prev by Date: validate the uniqueness of data first before inserting
  • Next by Date: Re: validate the uniqueness of data first before inserting
  • Previous by thread: validate the uniqueness of data first before inserting
  • Next by thread: Re: validate the uniqueness of data first before inserting
  • Index(es):
    • Date
    • Thread