Sequences using JD2 InfoProducer/InfoSwing

Can you tell me how to assign [automatically] a unique value to one member of a composite primary key in a detail table each time the NavigatorBar inserts a new row into it.
I've been trying things like
select sequence1.nextval, col_id from detail in the queryInfo property
and
master.col_id = detail.col_id in the masterLinkInfo property
. . . naturally, to no avail.
Phil

Here are some items from previous posts on this issue...
For the Nextval question, just do one of the following:
(1) If you want an ON-INSERT trigger to assign the sequence value, then...
Mark the Primary Key attribute as
"[x] Refresh on Insert" in the Attributes
panel of the EO Wizard for the attribute
that the BEFORE INSERT FOR EACH ROW trigger
will be assigning.
(2) If you want your Entity Object to assign the sequence value, then...
Override the create() method in your EntityImpl subclass and write the following code:
Integer i = (new SequenceImpl("YOURSEQNAME")).getData();
setYourPrimaryKeyAttrName(new Number(i));
Alternatively, you can override the doDML() method and put the code in their if the operation is DML_INSERT.
The only difference is that one will assign the sequence at the moment the EO is instantiated, the only only when
it is physically inserted.
//Here's a code example that works for the
// customer table in the online order
// sample application that ships with
// jdeveloper 3. You need to override the
// entity's create() method (when you
// generate the entity you need to generate
//a create() method - check "create method"
// in the Java tab of the entity wizard).
public void create(AttributeList attributeList) {
super.create(attributeList);
SequenceImpl s = new SequenceImpl("customer_seq", getDBTransaction());
Integer next = (Integer)s.getData();
setId(new Number(next.intValue()));
}

Similar Messages

  • Changing the nextval of a sequence using alter sequence

    Hello experts,
    Is there any option to modify the nextval of a sequence using alter sequece command?
    Thanks in advance.
    J.Prakash

    Hi
    I do not think so there is any direct way to modify the nextval of a sequence, only workaround i can think of is firing two DDL
    alter sequence dumm increment by 10
    alter sequence dumm increment by 1Where first alter command would increment the nextval to (currentvalue + incement value) and second alter command would reset the increment to its original value in my case 1
    Regards

  • Drop/Create sequence using Oracle Job Scheduler

    IDE for Oracle SQL Development: TOAD 9.0
    Question: I am trying to do the following:
    1. Check if a certain sequence exists in the user_sequences table
    2. Drop the sequence if it exists
    3. Re-create the same sequence afterward
    All in a job that is scheduled to run daily at 12:00 AM.
    What I would like to know is if this is even possible in the first place with Oracle jobs. I tried the following:
    1. Create the actual "BEGIN...END" anonymous block in the job.
    2. Create a procedure that uses a dynamic SQL string using the same "BEGIN...END" block that drops and recreates the sequence using the EXECUTE IMMEDIATE commands
    But I have failed on all accounts. It always produces some sort of authorization error which leads me to believe that DDL statements cannot be executed using jobs, only DML statements.
    BTW, by oracle jobs, I mean the SYS.DBMS_JOBS.SUBMIT object, not the job scheduler.
    Please do not ask me why I need to drop and recreate the sequence. It's just a business requirement that my clients gave me. I just want to know if it can be done using jobs. If not, I would like to know if there are any work-arounds possible.
    Thank you.

    Please do not ask me why I need to drop and recreate the sequence. It's just a business requirement that my clients gave me. I just want to know if it can be done using jobs. If not, I would like to know if there are any work-arounds possible.Well, I won't ask you then, but can you ask your clients why on earth they would want that?
    Do they know that doing DDL 'on the fly' will invalidate the dependent objects?
    Best shot you can give at it is reset the sequence. And you could do it in a job, yes, as long as it's interval is during some maintenance window (no active users).
    Regarding resetting a sequence, you, (and your clients) should read this followup:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1119633817597
    (you can find lots more info on sequences and jobs by doing a search from the homepage http://asktom.oracle.com)
    Regarding the authorization errors: your DBA should be able to provide you the nessecary privileges.
    But in the end, this is something I'd rather not would like to see implemented on a production system...

  • How do I increase the maximum number of images I can acquire in a sequence using the IMAQ 1424 with 80 MB of onboard memory and a Duncan Tech camera?

    I've increased the maximum number of buffers to higher than I need, but I still cannot acquire more than 139 images with the Duncan Tech digital video camera before I get a memory lock error. Is there any way to increase the number of images I can acquire in a sequence using the IMAQ 1424 with 80MB of onboard memory?

    It sounds like you are already bypassing the onboard memory. If you weren't, you would only be able to acquire about 20 images.
    If I understand correctly, you do not convert the images until after you acquire them. This means each acquired image is 4.13 MB, and 139 images will take 574 MB of memory. I wouldn't be surprised if that was all the free memory available on a 1 GB machine. The operating system, LabVIEW and any other software running probably take up the rest of the memory. You might want to put your computer on a diet and minimize the number of other programs and utilities running. The only other option I see is getting more memory if possible.
    Is there a way that you can reduce the number of images you need to acquire? Pe
    rhaps skipping every other frame? Do you really need more than 139 images?
    Is it possible to acquire the images in monochrome? That would triple the number of images that you could acquire.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • How to create a sequence using Toplink for DUAL table

    Hi All,
    How do I create below sequence using TOPLINK
    CREATE sequence my_seq start WITH 1;
    Regards,
    Dheeraj

    Hi Dheeraj,
    Sequence Object should be created in Database and specify the type of sequence that will be used in toplink to create sequence value.For example,sequence objects created in database needs to be configured using Native Sequence.
    For more information refer to the below link.Use JDeveloper Toplink Wizards for declarative programming of Toplink native Sequencing.
    http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/reldscfg003.htm.
    Regards,
    P.Vinay Kumar

  • Generating sequence Using row_number function.

    Hello All,
    I want to know if we can create sequence using row_number .
    I know we can create sequence using row_number but I want to start my sequence from 001, can we create using row_number?
    It will be great, If I can get a faster response.
    Thanks in advance.

    user13034857 wrote:
    Hello All,
    I want to know if we can create sequence using row_number .
    I know we can create sequence using row_number but I want to start my sequence from 001, can we create using row_number?
    It will be great, If I can get a faster response.
    Thanks in advance.
    SQL> set pagesize 60
    SQL> SELECT   TO_CHAR (ROWNUM, '000') Seq, s.table_name
      2    FROM   user_tables s
      3   WHERE   ROWNUM <= 20;
    SEQ  TABLE_NAME
    001 ICOL$
    002 CON$
    003 UNDO$
    004 PROXY_ROLE_DATA$
    005 FILE$
    006 UET$
    007 IND$
    008 SEG$
    009 COL$
    010 CLU$
    011 PROXY_DATA$
    012 TS$
    013 BOOTSTRAP$
    014 FET$
    015 CCOL$
    016 USER$
    017 OBJ$
    018 TAB$
    019 CDEF$
    020 OBJERROR$
    20 rows selected.
    SQL>
    SQL> SELECT   TO_CHAR (ROW_NUMBER () OVER ( ORDER BY dept),
      2                    '000')
      3              Seq,
      4           empno,
      5           ename,
      6           dept
      7    FROM   Emp;
    SEQ       EMPNO ENAME                                DEPT
    001       2345 zxcv                                   10
    002       1111 qwer                                   10
    003       1234 asdf                                   20
    004       5657 ghjk                                   20
    005       3125 tyui                                   30
    006       2134 zxvnb                                  30
    007       8907 cvmn                                   30
    7 rows selected.
    SQL>
    SQL>

  • Which sequence used in which procedure/procedures?

    how can i know which sequence used in which procedure/procedures?
    can i get it from any system view?

    855516 wrote:
    how can i know which sequence used in which procedure/procedures?
    can i get it from any system view?You can search DBA/USER/ALL_SOURCE for each sequence name. Logic could look something like
    foreach sequence name in dba_sequences
      search dba_source for sequence nameRemember that code can be written using upper or lower case :)

  • Regkey Import via task sequence using command line. Running directly from DP.

    I have a package that is going to run straight from the dp called JAVAHOME. Inside this package there is a regkey called JAVAHOME.REG
    If I want to run it as part of a task sequence using a command line.
    The run a command line step has use package called JAVAHOME checked.
    Now to import it, in run a command line I use
    cmd.exe /c reg.exe import javahome.reg
    or
    cmd.exe /c reg.exe import .\javahome.reg
    I always get it wrong when running things directly from the DP.

    To be sure about the behavior, I would use a batch file and use the %~dp0 variable. So, the command line in the batch file would be something like
    reg.exe import %~dp0javahome.reg
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Teach me how to create the opening "hallway" sequence using Adobe After Effects

    I need to create a memorial video for a loved one that passed away. Can someone teach me how to create the opening "hallway" sequence using AE? here is the video from youtube: https://www.youtube.com/watch?v=4191kcW07f0 . Thanks

    I'll give a very brief overview but, presuming that you are new to After Effects, understanding and executing on this overview will require learning the basics of After Effects.
    You'll be creating a 3D scene based on a few 3D layers: one each for the floor and each wall. Each of those 3D layers will be a precomposition layer; the wall layer with the pictures will be based on a precomposition in which you have placed your pictures as individual layers. You will create some 3D lights shining down from above. You'll create a 3D camera that you will then animate to move down the hallway.
    As I said, that is a very brief overview. Understanding each of those pieces will require some learning. After Effects is not a simple application, so you do need to be prepared to put in some learning time if you are going to do this yourself. Here is the place to start: http://adobe.ly/AE_basics
    All that said, I would recommend that you hire someone to do this for you. Learning a new and complex creative application under the time pressure (and other pressure) that you are under may be too much to ask.

  • Why can't I export my FCP 6 sequence using Compressor 3?

    I am wondering if anyone can tell me why I can't export my FCP 6 sequence using Compressor 3.0.5. 
    I have an hour-long 1080p Pro Res 422 sequence that I am trying to export using Compressor 3.  Whether I export using the 'Pro Res 422' preset or the 'H.264' preset, transcoding commences but then stops abruptly 15 to 20 minutes later with an error message saying 'Quicktime Error: -50.'
    For what it's worth, I have an early-2008 dual quad-core Mac Pro desktop with 6 GB of RAM and two ATI Radeon 5770 graphics cards.  I am currently running OS X 10.6.8.  The media (including Motion graphics) and project file are on an external drive connected via Firewire 800.
    Any advice on how to properly export this sequence at the highest quality without getting the error message is greatly appreciated!
    Shaun

    Are you "sending" to compressor?  Probably not the best way to work.
    First step:  make sure the sequence is COMPLETELY rendered.  If you don't understand how to do that, post back.
    Then, I'd strongly recommend that you export a quicktime file with current settings (file:  export:  quicktime movie NOT quicktime conversion) and bring that file into compressor and chose the appropriate preset.
    This workflow isolates each step and makes it easier to troubleshoot.
    Here are a few user tips that might be helpful
    Some tips for using compressor
    Common FCP Troubleshooting tips
    sending to compressor from fcp - a few issues

  • Re: Executing Planning Sequence using java script.

    Hi All,
    Can anyone tell me how to execute a planning sequence using a java script.
    Regards.
    Shafi.

    Hi Deepti,
    i have written a java script which will display the error message from IP in a Pop up window.
    For this to work the java script function needs to be called once the planning sequence is done with execution.
    I didn't find ways to do it based on the WAD commands.
    hence i thought i can run the planning sequence in the same java script that i have written.
    Can you help me based on the inpus ihave given ?
    Regards.
    Shafi.

  • In Numbers, how can I save a filter sequence using Reorganize?

    I'm using Numbers (from iWorks 9) and have a filterning sequence that involves a date range and finding specific values in a text column.  It's pretty straightforward to use the Reorganize button, but my macro program (QuicKeys) can't seem to negotiate the nested pull-down menu selections, so is there a way to save this sequence within Numbers?

    File menu, Export. Select Excel as the format.

  • Action sequence using PS Elements 10

    Hello Group, first post here anyway, I am trying to make an "Action sequence" picture using PS Elements 10, example: I took a few pictures of a guy surfing and what I would like is to merge 3 or 4 shots into one picture (I hope I explained this right) SO what I would end up with would be a guy surfing on the same wave but it would show him on it in 4 different places although its just the same wave.
                      Thanks, James

    I am using Windows 7.  I think that the best path might be a third party conversion program.  Do you have a recommendation?
    Thanks,
    Fred Czerner
    <mailto:[email protected]> [email protected]
    M: 703-909-9001 (Preferred)
    H: 703-329-0098
    F: 703-329-0099
    NOTICE: This message is for the designated recipient only and may contain privileged or confidential information.  If you have received it in error, please notify Fred Czerner immediately and delete the original.  Disclosing, copying, distributing or taking any action in reliance on the contents of this e-mail by other than the designated recipient is prohibited.

  • How do I remove a number sequence using batch rename

    Hi
    I know I've done this in the past but cannot seem to work it out today.
    I have a series of images "_####_[layercompName].png".  I would like to remove the underscores and numbers.  The underscores removal is easy, but how do I remove the numbers (####) when they are different for each filename?  I would like the end result to be [layercompName].png
    The reason I have these filenames in the first place is that I have run the photoshop script "layer comps to files", and this adds a number sequence prefix.  I have tried to alter the script following various instructions I've found from trawling the internet (this one included How do you remove the number sequence when exporting layer comps to files? CS6. Windows 8.) but without any luck.  So now I'm resorting to batch renaming in Bridge.
    Thanks!

    Here you go, taken straight from: DesignEasy: How to Remove Sequence Numbers and Empty Spaces When Exporting Layers and Layer Comps
    Run Adobe Bridge and navigate to the folder with exported files.
    Select all files which have sequence numbers.
    Go to Tools > Batch Rename.
    Choose: String Substitution from the first drop-down list in New Filenamessection. From the second drop-down choose: Original Filename. In the Find: text field type: _\d{4}_ (underscore, backslash, letter d, open bracket, number four, closed bracket, underscore). Leave Replace with: text field blank. Ensure that you have Replace All and Use Regular Expression checked as shown on the screenshot below.
    Click on the Preview button in the top right corner and ensure that files will be renamed as you want.
    Click on Rename button and you are done.
    In case you are first time doing this and you still have doubts if everything will work as expected, check Copy to other folder option when renaming files. This option is located near the top left corner under: Destination Folder.
    Another thing I want to mention is to remove everything that you have below String Substitution options. In case you see additional renaming options just click on minus (-) sign on the right side to remove them.
    How to remove/substitute empty spaces in the file name using Adobe Bridge
    It is pretty similar process. The only difference is that you should type: \s (backslash followed with letter s) in the Find: text field. You can leave Replace with: text field blank or to type underscore.

  • Processing files in Sequence using FTP Adapter

    Hi Experts,
    I have searched several forums but i am not clear on  how to process the files using FTP Adapter based on Timestamp.
    To process the files in sequence i.e, FIFO using FTP Adapter
    i have the files with file name customer and timestamp :  customer<yyyyMMddHHmmss>
    there are around 50 files in the FTP server llike this.
    I need to process these files acording to the timestamp and place the files in same processing sequence in the receiver end using the file adapter.
    If i specify the parametes in sender FTP Adapter as
    Qos= EOIO
    Queue name = ACCOUNT
    Whether these parameters would do the processing in sequence according to the Timestamp?
    Suppose if the queue ID for Inbound(SMQ2) is XBTI0_ACCOUNT then whether it will be the same for Outbound(SMQ1)?
    Kindly suggest me how to process the files in sequence according to the Timestamp using FTP Adapter
    Please reply..
    Thanks
    Sai

    Hi Shabarish,
    But this would require one more additional channel to process
    So i think it will take more time to process.
    Let me clarify my question once again.
    I need to Pick the files from FTP server based on their TimeStamp and in sequence.
    the file names are like this Customer<YYYYMMDDHHmmSS>.
    suppose i have 3 files as
    Customer20050413044534
    Customer20050414053430
    Customer20050315034533
    So i need to pick these files in this order and place the files in the same order to the receiver end(File Adapter)
    Customer20050315034533
    Customer20050413044534
    Customer20050414053430.
    As i am using FTP sender adapter i cannot use processing sequence "By Date".
    please suggest me on this.
    Thanks
    Sai.

Maybe you are looking for

  • How to configure JSpinner to accept number of hours (with mins and secs)

    I'm having a problem trying to figure out a simple way to enable a JSpinner to do allow the input in this format: n hours : n minutes : n seconds ex: 100 : 0 : 0, 1:59:59, 25:30:00 Where n hours could be from 0-n (not restricted by 24 hours) and minu

  • Kwin crash after the last update, KDE unstable !!!

    after the last update, this is the error http://i43.tinypic.com/27z9lr8.png http://i42.tinypic.com/96di52.png then there are the kde packages have been updated. kde-base-artwork kde-l10n-it kde-wallpapers kdebase-dolphin kdebase-katepart kdebase-kdep

  • Mail 5.1 port 993 time out

    Hi since 2 days ago , I face problems in my mail 5.1 mail can't connect to prt 993 , $ get me time out error , I try to recreate my account & mail get me "The Google IMAP server "imap.gmail.com" is not responding. Try checking the network connection,

  • Quick qmaster sharing question

    Just a quick question. Should I turn on and off sharing for my 8 instance cluster as I get ready to use compressor and qmaster, or can I just leave it on all the time. Does it slow other things down if sharing is enabled all the time? Thanks, Ken Mes

  • Host Credential with indirect login

    I am on Unix and we don't have direct log in to the OS, we have log in as our ID and then switch to Oracle. Does anyone have similiar set up like mine? If yes, then how did you guys set up? thanks