Home » Developer & Programmer » Forms » Ensuring record uniqueness at block level (Oracle Forms 6i)
Ensuring record uniqueness at block level [message #403001] Wed, 13 May 2009 07:08 Go to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hello,

I was wondering if there were some efficient (understand low-cost on code) alternative to implementing a validation on a block with many fields of various datatypes (char,date,number etc) with some formula-based field that would 'hash' these values. If this is not really clear I'm considering, for each record, to represent its set of values as a hash that is tested for uniqueness on the block. In your opinion is this feasible with forms 6i. I have been looking at utl_raw functions that unfortunately cannot be implemented in 6i directly.

best regards,
Didz


N.B : The block I mention really has a lot of fields of varied data types - for two of them they are of type varchar2(1024) and meant to store a string of 2-letter codes.
Re: Ensuring record uniqueness at block level [message #403644 is a reply to message #403001] Sun, 17 May 2009 20:04 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you considered just creating a unique index on the whole lot?

David
Re: Ensuring record uniqueness at block level [message #403704 is a reply to message #403001] Mon, 18 May 2009 03:09 Go to previous messageGo to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hello and thanks for the suggestion,

so you mean that I should set the primary key field to 'Yes'. Ok, in fact I thought of that but feared it would not be a productive practice...I meant that in general terms you only have 1 or a restricted number of candidates as primary key. Otherwise if it poses no issue, in fact it could be handy.

regards,
Didier
Re: Ensuring record uniqueness at block level [message #403705 is a reply to message #403704] Mon, 18 May 2009 03:18 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Note that PRIMARY KEY <> UNIQUE INDEX.
Re: Ensuring record uniqueness at block level [message #403714 is a reply to message #403705] Mon, 18 May 2009 04:09 Go to previous messageGo to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Yes,

well I though so indeed. Excuse my ignorance but could you elaborate please.

thanks a lot,
Didier
Re: Ensuring record uniqueness at block level [message #403721 is a reply to message #403714] Mon, 18 May 2009 05:31 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Tom Kyte does that far better than I'm able to.
Previous Topic: no movement in form (merged 2)
Next Topic: forms deployment issue for vista
Goto Forum:
  


Current Time: Fri Sep 20 12:42:14 CDT 2024