How write to database?

Hi,
if I have an input text form, where the user entry is stored in a variable of a bean, how could i write the value of this variable to the database?
I don't know how to code this. Is this realized within the bean or in the class of an entity object?
I would be very grateful, if someone could post a code example of this.

Read this section in the Fusion Developer Guide:
http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcvalidation.htm#insertedID4
7.4.1 How to Ensure That Key Values Are Unique
The Unique Key validator ensures that primary key values for an entity object are always unique. The Unique Key validator can also be used for a non-primary-key attribute, as long as the attribute is defined as an alternate key.
But in general you can either write code in your managed bean that access an AM and work with it - or you can use an AM Service method and write the logic you want at the ADF BC layer.
Both approaches are explained in the Fusion Developer Guide:
See sections 9.7 and 9.8 : Customizing an Application Module with Service Methods
or 9.10.3:
http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcservices.htm#sthref794

Similar Messages

  • How to open MSWORD using JAVA/JNI and write the database entries into WORD

    Hi..
    I am searching for java codes that uses JAVA NATIVE INTERFACE (JNI) for opening MSWORD 2003.
    To be brief.
    I created HTML form called Employee_data.
    if i click on Submit button a word document should be opened.This should be using JNI.
    I have also created a servlet in jsp to process the form data and store it into database(mysql).;
    Please help me to find the codes to open MSWORD on submit click and to write the database entries into word file.Can i get the full code for that.This is so urgent.
    Thanks in advance.

    Hi Suresh,
    The easest solution I can think of is to copy the math equation from the PowerPoint then paste in the Word document directly, there's actually no way to convert it to plain text, some equation is very complext, String variable is not suitable in this case.
    For example, this code works fine:
    var powerPoint = new Application { WindowState = PpWindowState.ppWindowMinimized };
    var oPresSet = powerPoint.Presentations;
    Microsoft.Office.Interop.PowerPoint._Presentation oPres = oPresSet.Open(@"C:\test.pptx", MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);
    var strObj = oPres.Slides[1].NotesPage.Shapes[2].TextFrame2.TextRange.MathZones.get_MathZones();
    strObj.Copy();
    Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
    wordApp.Visible = true;
    Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Add();
    doc.Range(0, 0).Paste();
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to write from database to XML file using JAVA and back..

    Hi....
    I am strugling for a code to write from database to xml output instead of what i have written in flat file....could anyone please help me out...to do this and again read the same back to the database using java...

    Hi,
    In java world, there is a tutorial on what you are looking for :
    http://www.javaworld.com/javaworld/jw-01-2000/jw-01-dbxml_p.html
    It uses SAX/DOM parsers to translate XML data into the appropriate fields of the database and visa-versa.
    Hope it helps.

  • How to Select Database Path via labview

    Hello gurus...........
        I am new user in labview. I want read and write in database through labivew . I have
    done read and write program. Now I want choose database storage path through labview .
    I tried differnt ways but I couldn't.
    First read and write program i did via UDL file path .Now i want Directly choose ".mdb" file path.
    I dont know how to do ......
    So if you know please help me.....
    Thanks advance
    Regards
    Arunkumar M
    India

    I think the way the database connectivity toolkit works, it is expecting the database to already exist. The function you are calling creates a table so it probably errors if the file doesn't exist. If you google 'create access database programmatically' you may be able to find something useful for creating a new access database file. Don't forget that you also have the native File I/O functions in LabVIEW for copying/moving files on disk.
    For the connection string...there's a handy website here: http://www.connectionstrings.com/
    I think you can also open a connection file (UDL) in notepad?

  • How to find database status

    how to find database status(average execution,reads,writes,block size)

    Please, use the copy and paste feature available on all the computer (CTRL-C and CTRL-V), go onto the oracle online documentation http://docs.oracle.com click on the link corresponding to your version, and paste the word I wrote previously.
    You'll got answers.
    Nicolas.
    i want to find out using sql queries.Didn't notice you WANT sql queries. Then my answer is out of scope. Except for the document link.
    Message was edited by:
    N. Gasparotto

  • How to bounce database automatically

    Dear all,
    I want to write a script and schedule it in crontab, if it is ebs I have scripts addbctl.sh and addlnctl.sh to stop database and listner. But in another application (not ebs) these scripts are not available and I have to manually bounce database, giving commands SHUTDOWN IMMEDIATE and STARTUP after logging in into sqlplus, Is there any way to do this.
    Regards,
    Charan

    Hi Charan;
    I have exported ORACLE_HOME and ORACLE_SID, but still not working. This is the script after exporting them
    export ORACLE_HOME=/aa/aa/aa/aa/aa
    export ORACLE_SID=aaa
    sqlplus apps/pwd
    select count(*) from dba_objects where status='INVALID';
    exit
    echo "the date of checking is $(date)"Firslty you are mention how you bounde database in your thread and now you are trying to solve your script. This scirpt doesnt mention any db related issue.
    So what you want to want
    1. Bounde db
    2. Edit sh?
    If you mention sh than your sh not correct, you can try to type something like
    export ORACLE_HOME=/xxx/11.2.0
    export ORACLE_SID=VIS
    $ORACLE_HOME/bin/sqlplus apps/xxxd @/xxx/cm_invalid.sql log=/xxx/cm_invalid.log
    You can check log or can send email to yourself
    PS:cm_invalid.sql=your query
    Regard
    Helios

  • How to use database look up table function in xsl mapping

    Can anybody tell me how to use database look up table function while mapping xsl between 2 nodes.
    I have an XML file coming in and depending on one of XML elements we need to decide which further path to take. But, using this XML element, we need to query database table, get metadata and accordingly take appropriate path. I have written lookup function which returns metadata value.
    Now, the issue is how do I pass the XML element valu as input to look up function? When I tried to drag it to the input node of lookup function, it throws an error like "Maximum number of parameters exceeded"
    Thanks,

    If the lookup table is always going to remain the same (e.g. a character generator or something similar) you can place the values in a 2D array constant on your diagram, with the input value as one column, the equivalent as the other. When you need to perform the lookup you use an index array to return all the values in the "input column", search it using "search 1D array" and use the resulting index number to index the other column's data. If the values may change, then it would probably be best to load an array control with your equivalent values from a file.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Query Database - Write to Database

    I am querying a SQL DB which has 10 results in total with 15 fields each. The run book will filter out 2 eventually based on some rules.
    Once all the activities are complete as per the runbook, I want to write back to the database as 'Complete' under Field called Status
    The write works, however it creates a new item completely. I want to update the existing request
    Regards, Vik Singh "If this thread answered your question, please click on "Mark as Answer"

    So if I understand correctly you are querying a database and based on the response you do some activities and then you want to update the records you queried in order to indicate that the activities have been completed?
    If you just want to update the existing records then I would probably just do an Update query based on the primary-key of the record you queried using the "Query Database" activity instead of the "Write to Database" (which always writes
    a new record).
    Something like: Update [Table Name] set Status = 'Completed' where PrimaryKey = 'xxx'
    You will probably need to cut up the Query Result from your first query first in order to get the Primary Key.
    Usually I do this by reading Published Data "Full Line as String Seperated by ;" with a PowerShell Script (Run .NET Activity).
    For example:
    $Query = <Full Line as String >   //Published Data from the Query activity
    $All_Records = $Query.Split(";") //this creates an array where every record is a column from the query result
    $PrimaryKey = $All_Records[0]  (if the primarykey is found in the first record of the array of course)
    Then use that $PrimaryKey value in your new query.

  • How to create database in 10g xe

    How to create database in 10g xe? could you please direct me to which documentation in 10g xe website? is it possible to create the db from the web console? if so, how? I can't seem to find a way to do it? Thanks

    You cannot: there can only be one XE database per host and it's created when you install Oracle XE.

  • How to view database table in OAF run page.

    Hi,
    how to view database table in OAF run page,any manual setting .please help me.
    thanks
    saran.

    Hi;
    1. This site side related EBS for your issue there is sqldeveloer dedicated forum side
    Forum Home » Application Development in PL/SQL » SQL Developer (Not for general SQL/PLSQL questions)
    2. Please see:
    http://docs.oracle.com/cd/B10501_01/java.920/a96655.pdf
    Regard
    Helios

  • How to view database table in oracle9i Jdeveloper

    Hi,
    how to view database table in oracle9i jdeveloper,any manual setting .please help me.
    thanks
    saran.

    In Jdeveloper go to View-->Connection Nevigator. there you will see all kind of connctions. Expand Database and check if your DB connection is present there. If not, you need to create using right clicking on Database and choose New Database Connecton. Here few screens will be there where you need to put the TNS entries of your database.
    Once DB connection is created, you can expand the connection by clicking on + icon and you can see different available schema objects. Again you need to expand Tables and you can look for specific table in there.
    Hope this clears your doubts.
    Thanks,
    Mukesh Uchaniya

  • How to view database table in oracle9i developer

    Hi,
    how to view database table in oracle9i developer,any manual setting .please help me.
    thanks
    saran.

    Hi;
    1. This site side related EBS for your issue there is sqldeveloer dedicated forum side
    Forum Home » Application Development in PL/SQL » SQL Developer (Not for general SQL/PLSQL questions)
    2. Please see:
    http://docs.oracle.com/cd/B10501_01/java.920/a96655.pdf
    Regard
    Helios

  • How to use Database views in XI

    Hi Folks,
    Any idea about how to use Database views for sending and receiving messages in XI ?
    Regards,

    Farooq,
    My doubt is do i have work in the same fashion as if i am working on a Database Table...?
    For Ex :
    Creating Source and Target Data structure for JDBC adapter in the same format....etc
    Regards.

  • How to determine database growth for new B1 instalation

    Hello B1 people,
    I'm working on the capacity planning of my new business one project and must know how to determine database growth. Does anyone did something like that before?
    Wich tables should I consider?
    Thanks in advance.

    Hello Gabriel,
    I think it is difficult to make any predictions about database growth because this depends on the volume of your business transactions, the number of users, the continuity of your master data...
    For example a small number of users can create a lot of transactions (accounting, logistics) with big documents like sales orders with more than 100 items, or a lot of users who primarily look up things but only create small transaction won't create too much data and thus influence database growth in totally different ways.
    You should collect information about the volume of daily business to make any forecasts.
    If you start with an empty database, the first big growth will be when you upload your master data, but if only few business transactions follow, you shouldn't use that first increase for your calculation.
    Is this your very first B1 installation, or do you already have B1 systems running? If you use the EWA service on a running B1 installation on a regular basis, then you will get a good impression of database growth and transaction volume but you should only use this as a basis for your calculation if the business of the new installation is similar to already running company's.
    Hope that helps,
    Sandra

  • When and How to close database connection in JSP?

    Hi there,
    I am using MySQL and JDBC 3.0, in my system, When and How to close database connection in JSP?
    Thanks in advance.
    Lonely Wolf
    <%@ page session="true" language="java" %>
    <jsp:include page="checkauthorization.jsp" />
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%--
    Execute query, with wildcard characters added to the
    parameter values used in the search criteria
    --%>
    <sql:query var="availablecomputerList" dataSource="jdbc/Bookingcomputer" scope="request">
    SELECT * FROM computer where status=0
    order by s_code
    </sql:query>
    <html>
    <head>
    <title>Search Result</title>
    </head>
    <body bgcolor="white">
    <center>
    <form action="checkin.jsp" method="post">
    <input type="submit" value="Back to Check-in Page">
    </form>
    <c:choose>
    <c:when test="${availablecomputerList.rowCount == 0}">
    Sorry, no available computer found.
    </c:when>
    <c:otherwise>
    The following available computers were found:
    <table border="1">
    <th>Computer</th>
    <th>Description</th>
    <th>Status</th>
    <c:forEach items="${availablecomputerList.rows}" var="row">
    <tr>
    <td><c:out value="${row.s_code}" /></td>
    <td><c:out value="${row.description}" /></td>
    <td><c:out value="${row.status}" /></td>
    </tr>
    </c:forEach>
    </table>
    </c:otherwise>
    </c:choose>
    </center>
    </body>
    </html>

    when should you close the connection? when you're done with it.
    how should you close the connection? like this: conn.close();
    that said, doing this in a JSP page is bad form and not recommended
    JSP's typically don't contain ANY business or data logic

Maybe you are looking for

  • MagSafe LED Green, but Battery Not Charging to 100%

    I got my MBP 15" (the "low"-end version) about 3-4 weeks ago. About a week ago, I noticed that when working on my computer with the AC adapter plugged in, it charged up to 98% (according to both CoconutBattery and the Mac itself) and then stopped; th

  • Should I erase and replace my former internal hard drive?

    Recently my computer started booting slowly, or just hanging during regular activities. If I shut it down, I couldn't always get it to boot up again. When I could boot to my Recovery HD, I ran Disk Utility and repaired both permission and disk errors

  • Problem in code

    Hi experts, See the following code. TYPES: BEGIN OF TY_S_SENDERLINE,          LINE(4096)               TYPE C,        END OF TY_S_SENDERLINE,        TY_T_SENDER  TYPE TY_S_SENDERLINE  OCCURS 0 DATA: EXCEL_TAB1 TYPE ty_t_sender. So here i want to crea

  • Double invoice issue

    Hi, We have an internal vendor and so automatic invoice verification is implemented against the said internal vendor. However, the issue is there is a double invoice for some of the invoice refrence numbers. Check box for checking double inovice is a

  • How can i maintain conditions for vendor sub-ranges

    Hi All, How can i maintain conditions for vendor sub-ranges. These conditions apply to all materials from vendor's sub-range. Eg: vendor X has the two subranges R1 & R2. I want to maintain separate conditions for R1 & R2. When ever i created PO with