What is the best way to do Unique Key validation?

Hi All,
I'll have to provide a user friendly message when users create a record using an existed key (Most of the keys are combination key).
How to do it in a generic way?
Thank you in advance.

I have add this class:
public class CustomMessageBundle extends ListResourceBundle {
     public CustomMessageBundle() {
          super();
     protected Object[][] getContents() {
          return sMessageStrings;
     private static final Object[][] sMessageStrings
          = new String[][] {
          {"SCH_PK","violate SCH_PK"} --------SCH_PK is a combination key created in DB
In project properties->business components->options, added this class with its path to "Custom message bundles to use in this project"
But when I craete a new row using existed key(XXX YYY), it still gives me this message:
Too many objects match the primary key oracle.jbo.Key[XXX YYY].

Similar Messages

  • What is the best way to test connection keys?

    I've created multiple connection key for various rolse on a
    new site. When I select the key it asks if I want to replace the
    existing connection, which I really don't want to do.
    What is the best way to handle this so the administrative
    connection is not affected?

    Also create a connection key for you administrator role, so
    you can swiftly switch back.

  • I would like to use one library but with multiple ipods, but because they are my kids Ipods, and they each have their own gift cards, I'd like to be able to add money to their "profiles" without them having their own account - what is the best way

    So here is my delima - I want one Ipod account - because I only want one library - since we all like the same music - but my kids, who have their own IPODS, have gift cards, who want to be able to keep track of their balance without the other child affecting the balance - meaning - each gift card should be seperate and not totalled to the single account - Beacuse the library is fairly large, having three libraries of large amounts would be a waste.  I would also like to restrict their purchased to the gift cards only and not my credit card on file.  Does this make sense?  Once this is resolved, I'm assuming they would use their own playlists to copy their favorites to each Ipod.  Or would I set up an account for each child - which I dont want to do, because I dont want them having access to my Credit Card, and only gift card balances.  With multiple accounts, I'm assuming that would also build seperate libraries?  We also have multiple computers, but I share the library to those computers -
    What is the best way?  I'd like to be able to add credit to a specific child (birthdays, etc) without the other child being able to access that credit.  For simplicity sake.
    We are new to IPODS and lack any MAC skills.
    Thoughts?

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • What Is The Best Way To Set Up Kids iTouch To My iTunes?

    I have an iTouch set up with my iTunes music, movies and apps, but now I gave my kids each an iTouch.
    What is the best way to set up there account, should it be a unique account for each of them or should I put them under my account?
    They will be using my same iMac when they sync or update there iTouch, so will they need to log in under their name every time?
    Not sure what is the best way to set this up, they are both minors, i.e. no credit card.
    Thanks

    Better just your account for multiple devices. The only drawback is that the music will have to managed manually.
    Connect one of the iPods to your computer then launch iTunes. You should see the iPod under Devices on the left side of the iTunes window. Double click then you can name each iPod to keep them separate but only syncs to your iTunes account.
    Without knowing your Apple ID user name and password they would not be able to make purchases ergo no downloads you aren't aware of.
    How to use multiple iPods, iPads, or iPhones with one computer
    The kids are minors.. if they are under 13 years of age, according to Apple, they can't have their own accounts regardless.
    http://www.apple.com/legal/itunes/us/terms.html#GIFTS

  • We have always used one iTunes account and I want to crate a new account for my daughter.  What is the best way to go about this and will she need to download free apps again?

    We have always used one iTunes account and I want to crate a new account for my daughter.  What is the best way to go about this and will she need to download free apps again?

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • What is the best way to handle .mod files in premiere pro cs4?

    I recently got a JVC Everio GZ-MG130u and as I'm sure many of you are aware, it saves footage in the .mod format.
    I have googled this and found quite a few different solutions, but I'm just wondering if anything has changed since some of these solutions were posted, or in other words, what is the best way at this current point in time to handle .mod files in premiere pro cs4?
    As far as I know, the best thing to do is convert the .mod to .avi and then import it into premiere so it can be edited.. Is there a better way to do it than this? Also, by doing it this way, will I have separate audio and video tracks?
    Thanks.

    I have just done a bit of reading, here. All of the quotes that follow are from users who have posted in that thread.
    It seems that there isn't one solid answer on this subject. The thread that I linked to was started 2 years ago, and replied to just 4 ago, so it's relatively current.
    I noticed a couple different interesting statements:
    posted by mmontgomery:
    In the case of .MOD, you are actually getting a MPEG-2 file. The way
    video files work is that there is a codec (COmpressor/DECompressor)
    algorithm and a file wrapper (or extension). A JVC .MOD file is a
    MPEG-2 encoded file, with a .MOD extension.
    You're faced with two
    challenges, first the .MOD file type is only recognized and support by a
    few applications. I think we covered some of those already. The
    interesting thing about wrappers and extensions is that they can be
    dealt with in a variety of ways. Sometimes all you need to do to convert
    the video file to a compatible video file is to change the extension.
    In the case of .MOD files that's not enough. The .MOD wrapper apparently
    does a few more things than just bare a unique extension name. It
    requires a slightly more complicated method to convert that file. That
    is why there is supplied software and that certain third party
    applications have .MOD support.
    (posted 2 years ago)
    This seems to indicate that Ann's solution of simply re-naming the extension is not good enough, unless I am mis-interpreting what she meant.
    However, another user said:
    posted by futball8:
    I edit with Adobe Premiere Pro CS3. All I have to do is simply rename
    the .MOD files as .MPG and then import into PP CS3. It takes a small
    amount of time to conform the audio, but no file conversion is
    necessary. It's a pretty slick workflow and I've never encountered any
    problems editing them this way.
    (posted 5 months ago)
    One can only assume that simply re-naming the extension from .mod to .mpg works in some circumstances, and doesn't work in others. I assume it depends largely on the editing software being used. Perhaps there are still issues that futball8 was simply unaware of or never encountered.
    That said, there seems to be a couple of different real solutions to this problem that I have found:
    1. Simply use an editing program that supports .mod file format. While pe7 and pe8 supposedly support the .mod format, the following should be noted:
    posted by macksgarage:
    While Elements 'supports' these files, it is markedly unstable and  frequently crashes while using the files, though the application is otherwise reliable.  The solution I have arrived at is to repair the  container using ffmpeg. (see #3)
    (posted 5 months ago)
    2. Use a file conversion utility of your choice that will covert .mod to .avi, or another desired format. Import the resulting .avi file into premiere pro cs4.
    3. Use FFmpeg. This seems to be the best solution as it does not convert any audio or video:
    posted by macksgarae:
    If you are not familiar with ffmpeg, it may be a bit of a bear to
    learn, but it's not only useful for this, but functions as a video swiss
    army knife useful for splicing, muxing/demuxing, and rendering just
    about any format into just about any other format.
    ffmpeg is an open source project from the linux world, but it has
    been ported and is supported on windows.  Fetch it here and place it somewhere handy
    on your system.
    To rewrite the container into a nice, standards compliant .mpg file
    that doesn't make applications die, WITHOUT rerendering video or audio
    itself, I use this command.
    ffmpeg -i INFILE.MOD  -acodec copy - vcodec copy OUTFILE.mpg
    This not only renames the file, but actually rebuilds the container
    around unmodified video and audio data, yielding a file which works much
    more stably with Adobe applications, and presumably others as well, as
    ffmpeg's open source development goals result in very standards
    compliant files.
    (posted 5 months ago)
    Now, this seems to properly address the issues that can arise from simply renaming .mod to .mpg, as suggested by Ann. So from this point, I assume you can simply import the .mpg into Premiere Pro cs4 (or any other .mpg compliant program) and edit without issue, but it seems like I remember hearing something about Premiere not liking mpegs or something like that, so in that case, maybe it'd be better to skip this and go with option #2. But, it's been awhile since I've touched any NLE, much less premiere pro cs4, so I could be completely wrong and it may have no problems handling mpegs.
    All of the things that I've quoted here came from the same thread, so I don't know how accurate any of this is, but the people that have posted these things seem fairly knowledgeable. If someone reads all of this and can confirm or deny any of it, it would be much appreciated.
    Option 1 is not really an option for me, because I am sticking with premiere pro cs4 -- I'm not going to get another editor just because it has .mod support. That leaves me with options 2 and 3: Convert to avi, or change the file wrapper/extension properly with FFmpeg and then simply import the resulting .mpg file... Which is better? Or is there yet another solution that I am unaware of that would be even better?

  • What is the best way to email a webpage?

    This concerns sending (emailing) a webpage to someone.
    • Amazon.com has a feature that allows one to page through a book that you may be considering purchasing.
    • I want to email some of the text from a page in one such book to someone else.
    • Although the page is viewable to me I have not found a way to copy it (to then paste it into an email), nor can its URL be sent as a unique (and openable) locator address.
    What is the best way for me to email the text? (I tried saving it via 'Print as Compressed PDF') but the result was not viewable even to me, so it won't be to my correspondent either).
    While I'm at it, what is considered to be the best way to view PDF's on the Mac -- the built-in PDF viewer seems rather limited. (Maybe that's why I couldn't view the saved PDF file of the webpage -- should I download the Mac version of Adobe Reader?)
    Many thanks.

    It doesn't work...
    It works for me in the Safari 3 beta. I'm actually surprised if the beta does much that's different with the "Mail Contents of This Page" command than Safari 2....
    I tried The Yiddish Policemen's Union: A Novel on Amazon (first searchable book I found quickly clicking in the Books section ). I just emailed myself a page - the first search result for the word "something." The email I received is perfect - the entire page from the book plus the Amazon page around it, all perfectly formatted.
    I suppose if you don't use Mail.app for your email program that might not work as well. Are you using Mail or another email program?

  • What's the best way to delete 2.4 million of records from table?

    We are having two tables one is production one and another is temp table which data we want to insert into production table. temp table having 2.5 million of records and on the other side production table is having billions of records. the thing which we want to do just simple delete already existed records from production table and then insert the remaining records from temp to production table.
    Can anyone guide what's the best way to do this?
    Thanks,
    Waheed.

    Waheed Azhar wrote:
    production table is live and data is appending in this table on random basis. if i go insert data from temp to prod table a pk voilation exception occured bcoz already a record is exist in prod table which we are going to insert from temp to prod
    If you really just want to insert the records and don't want to update the matching ones and you're already on 10g you could use the "DML error logging" facility of the INSERT command, which would log all failed records but succeeds for the remaining ones.
    You can create a suitable exception table using the DBMS_ERRLOG.CREATE_ERROR_LOG procedure and then use the "LOG ERRORS INTO" clause of the INSERT command. Note that you can't use the "direct-path" insert mode (APPEND hint) if you expect to encounter UNIQUE CONSTRAINT violations, because this can't be logged and cause the direct-path insert to fail. Since this is a "live" table you probably don't want to use the direct-path insert anyway.
    See the manuals for more information: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#BGBEIACB
    Sample taken from 10g manuals:
    CREATE TABLE raises (emp_id NUMBER, sal NUMBER
       CONSTRAINT check_sal CHECK(sal > 8000));
    EXECUTE DBMS_ERRLOG.CREATE_ERROR_LOG('raises', 'errlog');
    INSERT INTO raises
       SELECT employee_id, salary*1.1 FROM employees
       WHERE commission_pct > .2
       LOG ERRORS INTO errlog ('my_bad') REJECT LIMIT 10;
    SELECT ORA_ERR_MESG$, ORA_ERR_TAG$, emp_id, sal FROM errlog;
    ORA_ERR_MESG$               ORA_ERR_TAG$         EMP_ID SAL
    ORA-02290: check constraint my_bad               161    7700
    (HR.SYS_C004266) violatedIf the number of rows in the temp table is not too large and you have a suitable index on the large table for the lookup you could also try to use a NOT EXISTS clause in the insert command:
    INSERT INTO <large_table>
    SELECT ...
    FROM TEMP A
    WHERE NOT EXISTS (
    SELECT NULL
    FROM <large_table> B
    WHERE B.<lookup> = A.<key>
    );But you need to check the execution plan, because a hash join using a full table scan on the <large_table> is probably something you want to avoid.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • What is the best way to archive old footage (DVD, VHS, Super 8 etc.)

    Hello,
    I am starting a huge archiving projet of possibley 100-200 hours of footage from all kinds of sources (VHS tapes, Mini DV, Super 8 film).
    What is the best way to archive this footage at the highest possible resolution?
    What sort of file should be saved?
    Im a complete starter at this.
    Thank you!

    One strategy is to purchase a Canopus ADVC300 analog/dv converter. It has a TBC incorporated.
    You connect your original source material (for example - VHS deck) to the Canopus via analog cables then from the Canopus via firewire to your computer. This will turn everything into DV format.
    Play the tape through the canopus and record to your hard drive.
    Take good notes for each tape. Create a logging sheet and make notes as the system captures.
    Once you have the tapes in the computer, break them into 1 hr or less segments by some reasonable system - chronologically, by personalities, locations or whatever makes sense to you.
    Then write out each 1 hour segment back to a DV recorder. Give each tape a unique reel number - and make the reel number part of the file name on the computer.
    When you are done in a year or two ( lol ) you should have two matching sets of material - one on the hard drives and one on tape - with names that make it easy to cross reference and a binder full of logging information. If you want to be fully digital, look into a nifty application like CatDV. It will help organize a mass of video info like this.
    DV runs at ~13-14GB/ hr. Plan you storage accordingly.
    Purchase professional quality DV tapes - not drugstore junk.
    Good luck.
    x

  • What is the best way to deal with fonts, new fonts, adding fonts, syncing?  thanks!!

    I just launched a trial of creative cloud and I use a lot if unique fonts via suitcase fusion.  Honestly, I do have problems often enough with suitcase fusion.  What is the best way to administer fonts!!!!!???!!!
    Many thanks.  Cindy

    Moving this discussion to the InDesign forum.
    Cindy Hoeppner you may want to consider also posting in the Illustrator and Photoshop forums.  You can find a list of available forums at https://forums.adobe.com/welcome.

  • What is the best way to transfer from one computer to another?

    In the next couple weeks, I'm going to be buying a MacBook Pro. I want to transfer my whole library (with all rolls, albums, slideshows, etc) intact. What is the best way to do this? I assume it's as easy as copying the whole iPhoto Library Folder, correct? Should I copy the iPhoto .plist files as well?
    Thanks

    Daniel:
    You're right about what to copy. Just the entire iPhoto Library folder into the Pictures folder on the new MBP. I'd also download and run BatChmod on the iPhoto Library folder with the settings shown here, substituting your account name for mine. You can either type in the path to the folder or just drag the folder into that field. This is just a little insurance that the ownership and permissions are set correctly after the transfer. INo need copy the preference file as one will be generated when you first open iPhoto on the MPB and the file paths in it will be unique to the current Mac. Best to start with a new one.
    Do you Twango?

  • What is the best way to move Contacts onto the iPhone?

    Hi Guys,
    I currently have Nokia N82, usually when i get a new Nokia (since am a TOO loyal customer) i just take a backup from the previous one and add it to the new one when i get! i hate copying to/from SIM...
    Now when i want to get the iPhone what is the best way to move the Contacts??
    i use a Windows machine, STILL!

    For the couple of iPhones I have access to, you've got three methods to get contacts onto the device aside from moving them onto the SIM; I have found that copying to and from SIMs can leave data fields not totally aligned.
    (1) Via a cloud. One uses MobileMe (via iCal/Address Book entries) and the second uses an Exchange-based cloud. Both seem to work pretty well, although I do experience an occasional lag from time to time.
    (2) Via a sync on a desktop. My preferred method. Connecting to iCal/Address Book>iTunes or Outlook 2007>iTunes work very well. My only issue was that Outlook didn't work as I'd expected the first time, just as with a couple of other phones in the past (it never did work with my Motorola Z9); to "fix" the issue, I simply refreshed Outlook's contacts and rebooted Outlook - I actually had to do the same thing with iCal to "blow out the pipes" and both sync conduits work fine now.
    (3) Transfer Contacts to the iPhone via email using a vCard for each contact. I use version 3.0-compatible vCard files generated from Address Book or Entourage (Mac), Outlook or just about what my business contacts generate. Just about every platform has some unique data type, but I haven't received a vCard yet the iPhone can't handle via email.
    Getting your Contacts out of the iPhone. Option (1) or (2) - that's it AFAIK. I hope this helps you out!

  • What is the best way to raise the volume in a movie that is a mp4.

    Hey thanks in advance. What is the best way to drastically improve sound quality from a mp4 file. Thanks in advance!!!

    To all but one device add a unique email address to Settings>FaceTime>You can be reached at and delete the common Apple ID email address. For more info see:
    MacMost Now 653: Setting Up Multiple iOS Devices For Messages and FaceTime

  • What is the best way to set up iTunes on our home network so all family members have access to all of our itunes library, even music we don't have on the cloud?

    I have five different people using 10 different apple devices on one itunes account in our family.  We have had trouble sharing.  What is the best way to set up itunes on our home network?  We have purchased music that sits on icloud, but we also have music we have imported from our previous cd library.  Our itunes program keeps crashing and dumping everyone's playlists.  So far we have all been using just the one desktop computer to sync to because we can't figure out how to share the same librarly and playlists on multiple computers in our home so devices can be synced at any location as well as playlists and purchases be made. 

    What is the best way to set up itunes on our home network? 
    One iTunes library per person.  One iTunes account per person.
    If people wish to share songs, they can make copies.
    When the inevitable day comes when the kids get older, you will not have to come back here and post asking how all that stuff can get separated!

  • HT1349 I lost/had my iPhone stolen. Tried using Find My iPhone and it's offline. It was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Tried using Find My iPhone and it's offline. It (Find my iPhone) was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Find My iPhone is good for misplaced iPhone but not good for thief and it was never meant to be.
    You chance of getting it back is very small.
    There are a few things you can try.
    Try remote lock/wipe your iPhone through Find My iPhone.
    https://www.icloud.com
    You can report to the police, cell carrier (expensive cell charges for international calls, roaming etc)
    Change all the passwords used in iPhone: Apple ID, E-mail, Bank Account ....
    http://support.apple.com/kb/HT2526

Maybe you are looking for