Sequence generation automatically

Hello,
I don't if I'm wrong or I'm unable to find how: I'd like to generate sequences for primary keys in a database. I can generate the sequences but I do not find the way to trigger it automatically.
Does anyone know if Designer generates the whole pack: sequence and trigger or do I have to write the trigger manually and associate it with the sequence?
Thank you for help.

Hi,
Once you have generated the table and the sequence, generate the Table API for that table with the "Generate Table API Triggers" checkbox selected.
This will create and generate the triggers.
And if you are generating Form modules whose blocks are based on that table, your next step is to generate the Module Component API.

Similar Messages

  • Pls give me step by step sequence of Automatic Payment Prog

    Hi,
    Pls give me step by step sequence of Automatic Payment Program.
    Thanks in Advance

    Hi,
    Automatic Processing :  In this processing the system prepares open item to be paid and prepare a payment document & to this payment document the system prepares a cheque with the payment advise note automatically
    Configuration of Automatic Payment Program :  SPRO -  Ref-IMG-FA-A/R&A/P u2013 Business Transaction- Outgoing Payments u2013 Automatic Outgoing Payment u2013 Payment Method/Bank Selection for payment program u2013 Set up all Company codes for payment transactions.(T.Code:FBZP)
    New Entries
    Company code : 6023
    Control data
    Paying Company code : 6023
    Enter & Save  back to menu item
    Setup paying  Company Code for Payment Transactions :
    New entries
    Paying Company Code : 6023
    Control Data
    Minimum amount for incoming payment ________
    Minimum amount for outgoing payment  500  INR
    Forms
    Sender Details
    Select Forms
    Form for the payment advice u2013 Select International Payment advice Note F_110_IN_AVIS
    Save          back to menu Item
    Setup payment methods per country per payment Transaction :
    New Entries
    Country IN
    Payment method X (any identification No or Alpha)
    Description Cheq
    Payment method for
    u2022     Outgoing payment
    Payment method classification    * Check
                                       Posting Details
                                       Document type for payment KZ
                                       Clearing Document Type     KA
    Use classic payment medium programs payment medium program RFFOUS_C
    RFFO  :     Program Code
    US     :     Country
    C     :     Payment
    Name of Print dataset :  LIST1S
    & SAVE  Back to menu Item
    Setup payment methods per Co code for Payment Transactions
    New Entries
    Paying Company Code : 6023
    Payment Method X
    Minimum Amount 500
    Maximum Amount  5000000
    Select form data
    Forms
    Form for the payment transfer medium F_110_PRENUM_CHECK
    (International u2013 Check (with check management)
    Next form
    Enter & Save  back to menu item
    Set up Bank determination for Payment Transaction : 
    Select Position button
    Paying Company Code 6023
    Paying Company Code     Name
    6023     Reliance Infocom
    Select Company Code
    Select Bank Selection : Ranking Order
    New Entries
    PAYMENT      CURRENCY            RANK ORDER          HOUSE BANK
    X          INR               1                   6SBI0
    X          INR               2                   6ICIC  (NEXT PREFERED BANK)
    ENTER & SAVE
    Select Bank Accounts
    New Entries
    HOUSE BANK     PAYMENT     CURRENCY        ACCOUNT ID    BANK SUB A/C
    6SBI0               X                   INR          6S002          211002
    6ICIC                X                   INR          6I002          211002
    If we do not specify currency --- all the currency accepted
    Save
    Select Available Amounts
    New Entries
    House Bank     Account ID     Days     Currency     Available for O/  Pay
    6SBI0             6S002     999         INR               500000
    6ICIC              6I002     999         INR               500000
    Save & Bank to Menu Item
    CHANGE VENDOR MASTER RECORD TO SPECIFY THE PAYMENT METHOD    XK02 :
    Vendor          1000000
    Co Code      6023
    Co Code Data
      Payment Transactions
    Enter
    Automatic Payment Transactions
    Payment Method    X
    & Save
    lly
    For all the Vendor Master Record specify the payment method
    Execution of Automatic Payment Program :-       Accounting u2013 FA u2013 A/P u2013 Periodic
    Processing F-110 u2013 Payments
    Enter Run Date : 20-04-2006
    Identification Code : YRK00
    Select Parameters
    Posting Date : 20-04-2006 Doc entered upto 20-04-2006
    Payment Control
    Company Code     Pmt Method          Next Posting Date
         6023               X               21-04-2006
    Accounts
    Select Vendor Accounts 1000000 to 3840099
    Specify the range of vendors
    Save the parameters
    Select Status Button
    Select Proposal Button
       Start immediately
    Continue
    Press enter key until the system displays a message payment proposal has been created.
    To Check Payments List u2013 Select Edit Proposal
        Continue
    The System displays
    Vendor      Item      PM       H.Bank                    Curr        Amount
    1000000          2          X           6S002    6SBIO        INR       500000-00
    To Block the Payment :   Double click on the item - again double Click
    Block
    Payment Block   A  Blocked for payment
    Continue
    Select back button
    Select exceptional list item u2013 Select Reallocation Block
    Payment Method X
    House Bank 6ICIC  61002
    Continue
    Select back button
    Save
    Select back button
    Select Printout/datamedium
    From printing/data medium exchange
    Program                Varient
    RFFOAVIS                            6023  AVIS
    Keep the cursor on first row/Columns Enter
    Name  : 6023 AVIS
    Select maintain Varients
    Select Continue Button
    Program run date
    Paying Co. Code  6023
    Number of Sample
    u2022     Print immediately
    u2022     Select attributes
    Varient Name
    Meaning     Payment advice form
    & Save
    Select back button
    Keep the cursor on 3rd row first column
    Program     Variant
    RFFOAVIS     6023 AVIS
    RFFOEDI1
    RFFOUS_C    6023SBI  (3RD ROW FIRST COLUMN)
    Select maintain Variant
    Paying Co Code : 6023
    Further Selection
    Paymethod   X
    House Bank  6SBI0
    Account ID 6S002
    Check Lot No : 2
    *     Print Checks                    Printer LP01   *  Print immediately
    *     Print Payment Advise Note          Printer LP01   *  Print immediately
    *     Print Payment Summery          Printer LP01   *  Print immediately
    Output Control
    Number of Sample Printouts     0
    Select Attributes Button
    Varient Name          6023SBI
    Meaning          State Bank of India
    Save
    Select back button
    From Printing
    Program Variant
    RFFOAVIS
    RFFOEDI1
    EFFOCUS_C 6023 ICICI
    Maintain Varient
    Paying Co Code : 6023
    Further Selections
    Payment Method X
    House Bank 6 ICIC
    Account ID 61002
    Check Lot No.2
    Print Control
    *     Print Checks                    Printer LP01   *  Print immediately
    *     Print Payment Advise Note          Printer LP01   *  Print immediately
    *     Print Payment Summery          Printer LP01   *  Print immediately
    Output Control
    Number of Sample Printouts     0
    Select Attributes Button
    Varient Name          6023ICICI
    Meaning          ICICI
    Save
    Select back button
    Select Status Button
    Select Payment Run
    Start Date : 20-04-2006  Start immediately
    Create Payment medium
    Select Continue Button
    Press Enter Key until system the display message u2013 payment run has been carried out
    Select Printout
    Print JOB
    JOB NAME          F11020060420-YRK00--?  1
    To check the job: System u2013 Services u2013 Output u2013Control u2013 Execute
    Spool No Type Date Time Status Pg Title Cheque
    *1167
    Select Display Content Button
    *1168               Payment Advice
    Post with Print Form  : 
    Accounting u2013 FA u2013 A/P u2013 Document Entry u2013 Outgoing Payment u2013 F-58
    Post+Print Form
    Payment method and form specifications
    Co Code   : 6023
    Payment Method X
    House Bank 6 ICIC
    Check Lot No : 2
    Alternative Form F110-PRENUM-CHK
    Printer
    Printer for Forms LP01       * Print immediately
    Payment Advice Printer LP01
    Enter Payments
    Document Date : 20-04-2006
    Posting Date      : 20-04-2006
    Bank Posting details
    Amount : 10000
    Value Date : 20-04-2006
    Payee
    Vendor  383001
    Select Process Open Items
    Select Partial Payment
    Simulate
    Post
    Print Parameters
    Output          LP01
    Number of copies 1
    *Continue
    The System display-PrintJob was generated System u2013 Services- Output Control
    Spool Req Number   XXXX
    Execute               Title
    Cheque
    u2022     Select  Display Content Button

  • Single image sequence generation. ?

    Hello, ..
    Essentially, I'm looking to find the best solution, to the idea of building sequences where and with using - importing, different sequencial, single images.
    — To be clearer perhaps, I'm a Weather student / enthusiast, and this would be toward generating a sequence / different sequences .. of hourly weather-satellite obtained images.
    To this point, or up until very recently, and in fact for several years previous, I have - in fact, been able to do this fairly simply, with using an older version of QuickTime (older logo, I think that main version offered still, through "Tiger".) and, with once I've dropped a first or more initial image more in particular, into the application, then merely dragging and dropping whichever others into its main viewer-window, checking save, and naming the file.
    — Perhaps, unorthodox. But, it's worked just fine for the idea.
    — And, of course, this idea can't be used with the newer version/s of QuickTime.
    "very recently": .... Today, and with having been using this method of "simple sequence" generation, together with older version of QuickTime, on my relatively new "iMac", and running Snow Leopard, Mac OS X v. 10.6.8 - all up to date, ....
    .. I've found that I'm no longer able to access the older version of the application.  (I think this advent, might be related to a "MacKeeper" clean-up that I did recently. ....)
    — In fact, the main reason that I can't say more exactly, which version it is - or was, in fact.
    Beyond this question more general, I'm thinking — (Something, I think that I'd read at one point in the past.) — that I can in fact do what I've suggested above, with / within QuickTime Pro.
    Hope this is clear - at all.
    Any help. ?
    Appreciate your response and time.

    Opening an "image sequence" (folder of sequentially named same dimension files) is a feature found only in QuickTime Player Pro.
    Beginning with Snow Leopard the OS includes QuickTime Player X (in Lion it is 10.1) in the Applications folder and QuickTime 7.6.6 is moved to the Utilities folder.
    QuickTime X has its own feature set but can't be upgraded to "Pro".

  • Sequence generation(urgent)

    Hi
    im new to jdev..I would like to set sequence generation for table fields.Im using JSp as my client and populating fields in the jsp screen.pls let me know is there any thing to set on wizard or any help in tutorial..thnks..

    I'm assuming that you've added your code segment to EmpImpl.java.
    The first parameter to SequenceImpl() should be the name of a database sequence, not the name of a table column.
    Once you've changed that, if you still get the same error, you need to check whether EmpImpl.java has a method called setId(), since this is what your error is complaining about. Your entity should contain accessor (getter and setter) methods by default. If your entity doesn't have these methods, then edit the entity, select the Java tab in the Entity Object Wizard, and check "accessor methods" for the entity object class.
    Lastly, I recommend testing your business components in the business component browser (aka the tester). This is a way of making sure your business logic works before you try to run your client.
    Blaise

  • Sequence generation in Oracle RAC env. (Cached, non-ordered)

    Env: Oracle Env. 11G, Transaction Java Application
    How does CACHED, non-ordered sequence behave (for PK generation), here is the scenario,
    Cache size =10
    Node 1 Active - Records created 1,2,3 (3 records total in table)
    Node Changes - 2 is Active - Records created 11,12,13, 14 (7 records total in table)
    Node Changes - 1 is Active - Records created 21, 22 (or are sequences going to be 4, 5) (9 records total in table)
    Node Changes - 2 is Active - No new record added (9 records total in table)
    Node Changes - 1 is Active - 2 more Records created (9 recor11s total in table) - Is it going to be 23, 24 OR or is it going to be 6,7 OR or is it going to be 31, 32 (9 records total in table)
    Please help with accurate generated seq numbers (PKs) for 9 records.
    Also, What happens to PK numbers at:
    * shutdown
    * hotbackup
    * mirroring whole schema or database to another separate db using storage mirroring
    * mirroring whole schema or database to another separate db using datapump
    How about using cached, ordered sequences to start with and change to no-order if needed for performance reasons
    -D

    A necessary problem solving skill in the Oracle environment is the ability to experiment. A couple of minutes constructing a simple test is better than hours of speculation:
    jw1> create sequence s1;
    Sequence created.
    jw1> select s1.nextval from dual;
      NEXTVAL
            1
    jw1> /
      NEXTVAL
            2
    jw1> conn sys/oracle@jw2 as sysdba
    Connected.
    jw2> select s1.nextval from dual;
      NEXTVAL
            21
    jw2> select s1.nextval from dual;
      NEXTVAL
            22
    jw2> conn sys/oracle@jw1 as sysdba
    Connected.
    jw1> select s1.nextval from dual;
      NEXTVAL
            3
    jw1> select s1.nextval from dual;
      NEXTVAL
            4
    jw1> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Advanced Analytics and Real Application Testing options
    [oracle@berlin1 ~]$ srvctl start instance -db jw -instance jw1 -startoption force
    [oracle@berlin1 ~]$ sqlplus sys/oracle@jw1 as sysdba
    SQL*Plus: Release 12.1.0.1.0 Production on Sat Aug 16 10:40:40 2014
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Advanced Analytics and Real Application Testing options
    jw1> select s1.nextval from dual;

  • How to populate sequence number automatically in fusion web application

    Hi all,
    I created simple fusion web application.
    I created a form which has programid and remaining fields are there.
    If i press save button program details will save in database.
    here i am giving programid manually. but i need to generate a sequence number to programid automatically.
    If i give program details and save for this program details one sequence number should be generate and save in databasePlease help me
    Thanks,
    raj

    Here there are two methods given
    1. Generating sequence number from the trigger
    2. another one is from java class.
    I tried two but i am not getting the sequence number.
    In my application under model project i have programview.
    i created CustomEntityEmpl java class.
    I double clicked on programid in attributes window, given some sequence name in name field,given db sequence name as as value.
    i mentioned name of sequence in Java class. but still it is asking a value when submiting the program details with out program id.
    please help ASAP
    Thanks
    Nag

  • Parent/Child BC4J Entity Object Sequence # Generation

    If anyone can help us in this we greatly appreciate it. We are using DBSequence data type to poplulate the parent entity with the sequence #; however, we need to populate the child entity with the same sequence #.
    We have a DB Trigger for every insert of the parent's key and it's working great but what do we need to do for populating the child record.
    Is there a way to get the sequence # as a part of the this code for the child entity object.
    protected void create(AttributeList attributeList)
    super.create(attributeList);
    SequenceImpl mySeq = new SequenceImpl("MY_SEQ",getDBTransaction());
    setMyObjectId(mySeq.getSequenceNumber());
    Thank you,
    Kamran

    Well,
    I still can't insert the parent's primary key as a forign key automatically. Like in the Dept/Emp situation, I need to setup the supporting Impl files so it would insert the Dept No automatically as a part of the Employee creation.
    New info : Here is a sample of what I am trying to accomplish. Sorry I could
    have been more clear:
    I am sending you my Workspace using Scott's table Dept and Emp. In my JSP file,
    The user needs to input the Department information and some of the Employee
    info, but the same deptno generated for the Dept record needs to be populated
    for the Employee at the time of submit.
    Please let me know if you need anything else.
    Thank you,
    Kamran
    Creat_Emp.jsp
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <jbo:ApplicationModule id="Mypackage2Module"
    configname="mypackage2.Mypackage2Module.Mypackage2ModuleLocal"
    releasemode="Stateful" />
    <jbo:DataSource id="Dept" appid="Mypackage2Module" viewobject="DeptView" />
    <jbo:DataSource id="Emp" appid="Mypackage2Module" viewobject="EmpView" />
    <jbo:Row id="myrow" datasource="Dept" action="Create" >
    <jbo:SetAttribute dataitem="*" />
    </jbo:Row>
    <jbo:Row id="myrow5" datasource="Emp" action="Create" >
    <jbo:SetAttribute dataitem="*" />
    </jbo:Row>
    <form NAME="sForm" action="Submit.jsp" >
    <td><h3> DAAO <br> New Dept Entry Screen</h3></td>
    <tr>
    <TABLE bgColor="#c0c0c0" cellspacing="0" cellpadding="0" border="0" frame="box"
    style="WIDTH: 530px; HEIGHT: 34px" >
    <TR>
    <TD><font color=darkyellow >Dept No:<br><jbo:InputText datasource="Dept"
    dataitem="Deptno" ></jbo:InputText></TD>
    <TD><font color=darkyellow >Dept Name:<br><jbo:InputText datasource="Dept"
    dataitem="Dname" ></jbo:InputText></TD>
    <TD><font color=darkyellow >Dept Location:<br><jbo:InputText datasource="Dept"
    dataitem="Loc" ></jbo:InputText></TD>
    </TABLE>
    <TABLE bgColor="#c0c0c0" cellspacing="0" cellpadding="0" border="0" frame="box"
    style="WIDTH: 530px; HEIGHT: 34px" >
    <TR>
    <TD><font color=darkyellow >Emp Dept No:<br><jbo:InputText datasource="Emp"
    dataitem="Deptno" ></jbo:InputText></TD>
    <TD><font color=darkyellow >Emp Id<jbo:InputText datasource="Emp"
    dataitem="Empno" ></jbo:InputText>
    <TD><font color=darkyellow >Emp Name:<br><jbo:InputText datasource="Emp"
    dataitem="Ename" ></jbo:InputText></TD>
    <TD><font color=darkyellow >Emp Job:<br><jbo:InputText datasource="Emp"
    dataitem="Job" ></jbo:InputText></TD>
    </TR>
    </TABLE>
    <TABLE bgColor="#c0c0c0" cellspacing="0" cellpadding="0" border="0" frame="box"
    style="WIDTH: 530px; HEIGHT: 34px" >
    <TR>
    <TD><font color=darkyellow >Emp Mgr:<br><jbo:InputText datasource="Emp"
    dataitem="Mgr" ></jbo:InputText></TD>
    </TABLE>
    <input name="RowKeyValue" type="hidden" value="<jbo:ShowValue
    datasource="Emp" dataitem="RowKey"/>" />
    <input type="submit" value="Save" /> <input type="reset" value="Clear
    Screen"/> <input type="BUTTON" value="Q&A" onClick="Create_new_qa.jsp">
    </form>
    <form NAME="qForm" action="Create_New_Qa2.jsp" ></TD>
    <input type="submit" value="Q&A" />
    </form>
    </body>
    <jbo:ReleasePageResources releasemode="Stateless" />
    </html>
    Here is the submit.jsp
    <%@ page language="java" contentType="text/html;charset=WINDOWS-1252" %>
    <html xmlns:jbo="foo">
    <body>
    <center>
    <br>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <br>
    <jbo:ApplicationModule id="Mypackage2Module" configname="mypackage2.Mypackage2Module.Mypackage2ModuleLocal" releasemode="Stateful" />
    <jbo:DataSource id="Dept" appid="Mypackage2Module" viewobject="DeptView" />
    <jbo:DataSource id="Emp" appid="Mypackage2Module" viewobject="EmpView" />
    <jbo:Row id="myrow" datasource="Dept" action="create" >
    <jbo:SetAttribute dataitem="*" />
    </jbo:Row>
    <jbo:Row id="myrow5" datasource="Emp" action="Create" >
    <jbo:SetAttribute dataitem="*" />
    </jbo:Row>
    <%
    try
    %>
    <jbo:PostChanges appid="Mypackage2Module" />
    <jbo:Commit appid="Mypackage2Module"/>
    <p><font face="Arial, Helvetica, sans-serif"><b><font color="006699">DAAO Case Saved Successfully! </b></font></font> </p>
    <%
    catch(Exception exc)
    %>
    <title>this page will be displayed</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body bgcolor="#FFFFFF">
    <h1> Attenion the following error has occured:</h1><br>
    <%
    String error_msg = exc.getMessage();
    if(exc instanceof oracle.jbo.JboException)
    oracle.jbo.JboException jboex = (oracle.jbo.JboException)exc;
    String sMsg = jboex.getDetailMessage();
    out.println("<center>JBO Error:" + sMsg + "</center>");
    // grab exception object. type cast to jbo object then get details
    // parse details for specific error
    Object[] details = jboex.getDetails();
    if ( sMsg.startsWith("JBO-26041") )
    if (
    (details !=null)
    && (details.length >0 )
    && (details[0] instanceof java.sql.SQLException )
    java.sql.SQLException sourceException = (java.sql.SQLException)(details[0]);
    int sqlErrorCode = sourceException.getErrorCode();
    if (sqlErrorCode == 1400)
    out.println("<br><br><b><font color=\"006699\">One or more of the following required fields (Labeled in Red) have not been entered: </b></font></center><b>");
    else
    out.println("<br><br><b><font color=\"006699\"> Already exist on our system!! </b></font></center><b>");
    if ( sMsg.startsWith("JBO-26041") )
    else // unknown JBO exception
    } //JBO exception instance
    %>
    <jbo:ReleasePageResources releasemode="Stateless"/>
    <%
    return;
    %>
    <br>
    <br>
    <form action="main.html" method= onclick><input type="submit" value="Back to Main"></form>
    </center>
    </body>
    <jbo:ReleasePageResources releasemode="Stateless"/>
    </html>

  • Serial/Sequence Generation in INFORMIX

    Hello Friends,
    How can a sequence number be generated in INFORMIX? Its known that there is SERIAL
    column... But, is there any way to get this done as below:
    func()
    id=get_next_id();
    EXEC SQL insert into table1 values (id, ...);
    get_next_id()
    EXEC SQL select .......I don't know what should come here???
    return..
    This is possible in Oracle as u can read the next value from a sequence. Does
    Informix also provide some such functionality??
    Thanks for ur time and answers.
    Best Regards
    MS

    As far as I know, you can't. The serial is a property of the table. The new value
    is created when you insert a row in the table.
    (In fact you can force a value in the column, as long as it does not violate the
    UNIQUEness constraint).
    The engine will always try to take the next value, except when that is already
    present. On startup it takes the highest value in the column + 1.
    The serial is returned in the error structure (forgot the name for the moment)
    after the insert, so you can use it for other updates.
    The mechanism is less flexible than Oracle's, but automatic (as no separate select
    is necessary), KISS like.
    Regards
    "Manoj SASIDHARAN" <[email protected]> wrote:
    >
    Hello Friends,
    How can a sequence number be generated in INFORMIX? Its known that there
    is SERIAL
    column... But, is there any way to get this done as below:
    func()
    id=get_next_id();
    EXEC SQL insert into table1 values (id, ...);
    get_next_id()
    EXEC SQL select .......I don't know what should come here???
    return..
    This is possible in Oracle as u can read the next value from a sequence.
    Does
    Informix also provide some such functionality??
    Thanks for ur time and answers.
    Best Regards
    MS

  • Sequence Generation on Oracle Client

    Hi...
    We have to create sequences on the oc4j client with the format <mobileuser name><date stamp><sequence number>.How do we get the mobileuser name from the mobile client authentication.Can u please tell us the API to login the mobile client and how it can be passed on to include in the sequence.
    Thanks in Advance....

    You need to place that code where ever you are creating your user session object. I don't know the architecture you are using so I really can't tell you exactly where to place it.
    http://download-uk.oracle.com/docs/cd/B19188_01/doc/B15920/nvappdev.htm
    Here is what the documentation has on the subject:
    <blockquote>
    7.2.4.3.2 Web-to-Go User Context
    Web-to-Go creates a user context (or user profile) for every user who logs in to Web-to-Go. Web applications always run within the user's specific context. Servlets, which are always part of an application, can use the user context (in which it is running) to access the services provided by Web-to-Go. The user context can then be used to obtain the following information.
    Name of the user
    Mode the user is running in (online or offline)
    Application that a user is accessing
    The database connection
    Roles that the user has for this application
    Name or value pairs stored in the registry for the user
    Servlets can access the user profile through the standard named java.security.Principal obtained through the getUserPrincipal method of the javax.servlet.http.HttpServletRequest class.
    This object can also be obtained from the HttpSession object. For example,
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException{
    // Retrieve the database connection from the User Profile,
    // which can be accessed from the HttpRequest
    HttpSession session = request.getSession(true);
    OraUserProfile profile = (OraUserProfile)session.getAttribute("x-mobileserver-user");     
    7.2.4.3.3 Database Connectivity in Java Code
    Servlets can obtain a connection to the Oracle database, using the following statement.
    HttpSession sess = request.getSession();
    WTGUser user = (WTGUser)sess.getAttribute("x-mobileserver-user");
    Connection conn = user.getConnection() ;
    </blockquote>

  • Sequence generation issue

    Hi , I am working in Healthcare industry . we have a claim and payment matching process . Every day 1.5 million payments get matched with 70 million claims and the matched payments are stores in some output table . After matching, an oracle seqence number is generated for each matched record and that is the primary key for the output table.
    Match query will be like this,.
    Select seqeunce1.nextval,a.column1,a.column2,b.coulmn1,b.column2 from claim_table a, payment_table b
    where a.column3=b.column3
    We are facing some seqence problem here. some sequence are missed during the first day and the missed sequnces are getting generated in the second day.
    Sequence Query:
    CREATE SEQUENCE ERA_CLAIM_MATCH_S
    START WITH 1
    MAXVALUE 999999999999999999999999999
    MINVALUE 1
    NOCYCLE
    CACHE 500
    NOORDER;
    Example to demonstrated the problem:
    Day 1(15th July) : sequence generated from 1 to 1000000 (some sequence are missed in between)
    Day2 (16th July) : sequence generated from 2500 to 2000000 (some missed sequence in day 1 are generated here)
    Our database in in RAC system.

    Hemant K Chitale wrote:
    I think that the question is : If the highest value generated on Day 1 was 1000000,  how could a value of 2500 be generated on Day 2 ?
    Shouldn't happen if the Sequence is a NOCYCLE.Hemant, but that is possible if Day 1's processing used the sequence on RAC instance 1 - whereas on Day 2, RAC instance 2 (with unused cached sequences from yesterday) is used.
    E.g.
    // on node 1
    SQL> create sequence testseq start with 1 increment by 1 nomaxvalue nocycle;
    Sequence created.
    SQL> select testseq.nextval, sys_context( 'user', 'instance_name' ) as instance from dual;
       NEXTVAL INSTANCE
             1 dev_1
    // on node 4
    SQL> select testseq.nextval, sys_context( 'user', 'instance_name' ) as instance from dual;
       NEXTVAL INSTANCE
            21 dev_4
    // on node 1, use the sequence a couple of times
    SQL> declare i integer; begin loop i := testseq.nextval(); exit when i > 100000; end loop; end;
      2  /
    PL/SQL procedure successfully completed.
    SQL> select testseq.nextval, sys_context( 'user', 'instance_name' ) as instance from dual;
       NEXTVAL INSTANCE
        100002 dev_1
    SQL>
    // on node 4, check the sequence
    SQL> select testseq.nextval, sys_context( 'user', 'instance_name' ) as instance from dual;
       NEXTVAL INSTANCE
            22 dev_4

  • Sequence Generation

    Hi,
    I want to generate a sequence of numbers daily remebering where the last sequence number was from the day before.
    Is there a straight solution in lieu of using a JDBC solution.
    Can somebody help on this and give some clarity.

    Hi ,
    I guess by having a counter object ,storing the current sequence in it,and using persistence u can acheive the same.
    But i wud have gone for a database storage.

  • Lightroom export sequence number automatic increment and update

    I'm exporting to hard disk using the name-sequencenumber option. When exporting multiple times, Lightroom does not seem to remember what sequence number it last used. Is there a configuration option somewhere to let Lightroom keep track of the sequence numbers used? For example, I have a set of 20 photos that I export. I set the name to X and the sequence number to 1000. So, the first export adds them to my destination folder numbers X-1000 through X-1019. Now, I import another batch of say 30 photos. When I go to export those, I get a warning that there are duplicate file names since Lightroom is starting over at 1000 again instead of 1020. I don't want to enter a new sequence number every time I export. Is there a way for Lightroom to remember the last sequence number it used?

    AFAIK, you have to enter the sequence number with every export.

  • DB Adapter Multi Table sequence generation through a procedure call

    Hi,
    I am trying to insert data into multiple tables (master/detail) .The proble I am facing is I need to insert data in such a way that the primary key column should be substitued by the value returned by a procedure/function .
    So I cannot use native sequencing as well for the primary key. Do let me know if anyone has done this before or anyone has any suggestions on this
    Thanx

    here is some sample code for and object type for a simple PO.
    create or replace type xxsoa_poline_inbnd_row_type as object
    ( LINE_NUMBER NUMBER
    , ITEM_DESCRIPTION VARCHAR2(400)
    , ITEM VARCHAR2(100)
    , ITEM_ID NUMBER
    , UNIT_OF_MEASURE VARCHAR2(10)
    , LIST_PRICE NUMBER
    , UNIT_PRICE NUMBER
    , QUANTITY NUMBER
    , PO_NUMBER VARCHAR2(10)
    grant all on xxsoa_poline_inbnd_row_type to apps;
    create or replace public synonym xxsoa_poline_inbnd_row_type for xxsoa.xxsoa_poline_inbnd_row_type;
    create or replace type xxsoa_poline_inbnd_rec_type as varray(9999) of xxsoa_poline_inbnd_row_type;
    grant all on xxsoa_poline_inbnd_rec_type to apps;
    create or replace public synonym xxsoa_poline_inbnd_rec_type for xxsoa.xxsoa_poline_inbnd_rec_type;
    create or replace type xxsoa_poheader_inbnd_row_type as object
    ( PO_NUMBER VARCHAR2(10)
    , VENDOR_NAME VARCHAR2(100)
    , VENDOR_ID NUMBER
    , VENDOR_SITE VARCHAR2(100)
    , VENDOR_SITE_ID NUMBER
    , SHIP_TO_LOCATION VARCHAR2(100)
    , SHIP_TO_LOCATION_ID NUMBER
    , BILL_TO_LOCATION VARCHAR2(100)
    , BILL_TO_LOCATION_ID NUMBER
    , ORG_ID NUMBER
    , AGENT_NAME VARCHAR2(100)
    , AGENT_ID NUMBER
    , APPROVED_DATE DATE
    , COMMENTS VARCHAR2(400)
    , STATUS VARCHAR2(10)
    , PO_LINE xxsoa_poline_inbnd_rec_type
    grant all on xxsoa_poheader_inbnd_row_type to apps;
    create or replace public synonym xxsoa_poheader_inbnd_row_type for xxsoa.xxsoa_poheader_inbnd_row_type;
    create or replace type xxsoa_po_inbnd_rec_type as varray(1000000) of xxsoa_poheader_inbnd_row_type;
    grant all on xxsoa_po_inbnd_rec_type to apps;
         create or replace public synonym xxsoa_po_inbnd_rec_type for xxsoa.xxsoa_po_inbnd_rec_type;
    create or replace type xxsoa_po_inbnd_type as object (
    po_rec xxsoa_po_inbnd_rec_type
    grant all on xxsoa_po_inbnd_type to apps;
         create or replace public synonym xxsoa_po_inbnd_type for xxsoa.xxsoa_po_inbnd_type;
    cheers
    James

  • Date/Time sequence generation

    Hello,
    NB: database is currently Oracle 8i (circumstances), migration to Oracle 9i is planned but not imminent.
    I have timestamped data logged to a database. The logging of the data
    occurs every second, but to reduce space constraints unless data falls
    outside a deadband it is not logged to the database.
    I'm looking for routines or methodology to fill in the missing data using
    SQL or PL/SQL (I have already written Java to do this on the client
    side but my gut feeling is that server side manipulation of the data in
    PL/SQL or even straight SQL would be more efficient)
    For example, given the following data where the time stamp is
    YYYYMMDDHH24MISS:
    Timestamp TagValue
    20030328080000 -10
    20030328080005 0
    20030328080010 -10
    20030328080020 -20
    I would need to produce:
    Timestamp TagValue
    20030328080000 -10
    20030328080001 -10
    20030328080002 -10
    20030328080003 -10
    20030328080004 -10
    20030328080005 0
    20030328080006 0
    20030328080007 0
    20030328080008 0
    20030328080009 0
    20030328080010 -10
    20030328080011 -10
    20030328080012 -10
    20030328080013 -10
    20030328080014 -10
    20030328080015 -10
    20030328080016 -10
    20030328080017 -10
    20030328080018 -10
    20030328080019 -10
    20030328080020 -10
    Data in this example has changed frequently but in real life the data
    does not change for days. The purpose of filling in the holes in the data
    is to allow complete reuse of the client side code which depends on the
    data being in the 1 second format. Previously data was logged to a
    custom binary file and when retrieved it was automatically put into the
    1 second format. The logging is being ported to and Oracle backend
    and I'm involved with updating of the client.
    Long winded description boils down to:
    Given two arbitrary timestamps, how do I generate all timestamps
    between them using a given interval (i.e. above we use 1 second,
    however request might be for 5 second, 1 minute, or 1 hour data
    interval)??
    Doing this on the server side will allow easy migration to the current
    client and then easy update of the client as many of the routines which
    currently iteratively process the data could be replaced by simple
    queries (averages, sums, dates when certain events occurred, etc).
    Thanks.
    -- John

    This is kind of ugly, but it does the job.
    SQL> SELECT TO_CHAR(ev_dt,'yyyymmddhh24miss'),val
      2  FROM t;
    TO_CHAR(EV_DT,        VAL
    20030328080000        -10
    20030328080005          0
    20030328080010        -10
    20030328080020        -20
    SQL> SELECT dt,NVL(val,(SELECT val
      2                     FROM t
      3                     WHERE ev_dt = (SELECT MAX(ev_dt)
      4                                    FROM t
      5                                    WHERE ev_dt <= TO_DATE(dt,'yyyymmddhh24mi
    ss')))) val
      6  FROM (SELECT TO_CHAR(start_dt + ((rownum -1)/24/60/60),'yyyymmddhh24miss')
    dt
      7        FROM (SELECT MIN(ev_dt) start_dt, MAX(ev_dt) last_dt
      8              FROM t),
      9             (SELECT 1
    10              FROM dba_tables
    11              WHERE rownum <= (SELECT ((MAX(ev_dt) - MIN(ev_dt))*24*60*60)+2
    12                               FROM t))
    13        WHERE start_dt+(ROWNUM/24/60/60) <= last_dt+(1/24/60/60)) a, t b
    14  WHERE TO_DATE(a.dt,'yyyymmddhh24miss') = b.ev_dt(+);
    DT                    VAL
    20030328080000        -10
    20030328080001        -10
    20030328080002        -10
    20030328080003        -10
    20030328080004        -10
    20030328080005          0
    20030328080006          0
    20030328080007          0
    20030328080008          0
    20030328080009          0
    20030328080010        -10
    20030328080011        -10
    20030328080012        -10
    20030328080013        -10
    20030328080014        -10
    20030328080015        -10
    20030328080016        -10
    20030328080017        -10
    20030328080018        -10
    20030328080019        -10
    20030328080020        -20
    21 rows selected.No guarantees on performance on a big table.
    TTFN
    John

  • Problems Rendering AAF imported Sequence(with Automatic duck) from Avid in CS5

    Hey
    so I'm encountering some troubls with rendering out my whole Project. Everything from export in Avid to import in AE worked perfectly so now im working with the Quicktime ref files created by the Duck(Codec DNxHD 120). I was able to do all my compositing and even render ot some short sequences to show my Client.
    But now I'm ready to render out my complete Sequence and it always gets to about 30-36 seconds and then says there is something wrong with the quicktime ref file. But if I just render that one image everything is fine....
    Has anyone else encountered this kind of Problem and has some usefull advice?
    Thanks in Advance
    Stephan

    Consolidate your media files in Avid to be in the same location and/ or even a single mixdown clip and re-export the references.
    Mylenium

Maybe you are looking for