Saving to database? Plaese help!

Just a quick question. I have some data in the form {some numbers separated by commas} which are saved to a text file. I can do this and it is working but what I wanted to know is whether it is possible to save the {numbers} into a database so that each field contains a {...}. If so how can I do this and do you have any egs. Any help will be greatly appreciated. Thanks.

Yeah, I think it might be possible to save data to a database from Java. Yeah, I'm sure of it - somebody must have done this before. ;-) Look for some JDBC tutorials.

Similar Messages

  • Uploading a file to be saved in database

    Hi all,
    I have a web application which users access through browser. There is a screen where I list certificates of a person from database. My requirement is that for a particular certificate, user will select a file and click Attach button. I then need to upload this file and saved in database for that certificate.
    What are the steps involved in uploading a file to be saved in database?
    <form>
    <input type="hidden" name="certificate_id" />
    <input type="file" name="certificate_file" />
    <input type="submit" value="Attach" />
    </form>Edited by: srhcan on Jun 16, 2012 8:48 AM

    Thanks guys for your help.
    My environment is Eclipse Indigo and JBoss 4.2.0. I have created a simple web application in to test Apache Commons FileUpload. This app consist of just one jsp and one servlet. The jsp has the input type file and is submitted to the servlet. The servlet prints out the file info. The 2 Commons jars fileupload and io are in WEB-INF\lib folder.
    I have tested it successfully when I run the Jboss from within Eclipse.
    But when I run the JBoss outside of Eclipse, I get this error message from servlet:
    2012-06-19 19:54:55,405 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[TestFileUpload].[FileUploadServlet]] Servlet.service() for servlet FileUploadServlet threw exception
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:199)
         at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:361)
         at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
         at com.abc.servlet.FileUploadServlet.doPost(FileUploadServlet.java:59)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:595)
    What could be the reason?
    This is the servlet:
    package com.abc.servlet;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Iterator;
    import java.util.List;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.commons.fileupload.FileItem;
    import org.apache.commons.fileupload.FileItemFactory;
    import org.apache.commons.fileupload.FileUploadException;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    * Servlet implementation class FileUploadServlet
    public class FileUploadServlet extends HttpServlet {
         private static final long serialVersionUID = 1L;
         * @see HttpServlet#HttpServlet()
        public FileUploadServlet() {
            super();
            // TODO Auto-generated constructor stub
          * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
          * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              boolean isMultiPart = false;
              try {
                   // Check that we have a file upload request
                   isMultiPart = ServletFileUpload.isMultipartContent(request);
                   System.out.println("isMultiPart=" + isMultiPart);
                   if (isMultiPart) {
                        // Create a factory for disk-based file items
                        FileItemFactory fileItemFactory = new DiskFileItemFactory();
                        // Create a new file upload handler
                        ServletFileUpload servletFileUpload = new ServletFileUpload(fileItemFactory);
                        List fileItemsList = servletFileUpload.parseRequest(request);
                        FileItem fileItem = null;
                        String fileName = null;
                        InputStream inputStream = null;
                        long inputStreamSize = -1;
                        Iterator iter = fileItemsList.iterator();
                        while (iter != null && iter.hasNext()) {
                             FileItem fileItem1 = (FileItem) iter.next();
                             System.out.println("---fileItem1.isFormField()=" + fileItem1.isFormField());
                             if (fileItem1.isFormField()) {
                                  String fieldName = fileItem1.getFieldName();
                                  String fieldValue = fileItem1.getString();
                                  System.out.println("fieldName=" + fieldName);
                                  System.out.println("fieldValue=" + fieldValue);
                             } else {
                                  fileItem = fileItem1;
                        fileName = fileItem.getName();
                        inputStream = fileItem.getInputStream();
                        inputStreamSize = fileItem.getSize();
                        System.out.println("fileName=" + fileName);
                        System.out.println("inputStream=" + inputStream);
                        System.out.println("inputStreamSize=" + inputStreamSize);
                        inputStream.close();
                        System.out.println("inputStream closed");
              } catch (FileUploadException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Edited by: srhcan on Jun 19, 2012 8:04 PM

  • Adobe Forms - Table control data Saved in Database table through Web Dynpro

    Hello Friends,
    I Am facing a Problem in Adobe Forms through Web Dynpro.
    i Want to Make Interactive online Adobe Forms - In Table Control user enter the multiple entry in the table control and after that Click on SAVE button , entry will saved in Database table.
    Please guide me.
    Thanks in advance.
    Gaurav.

    Hi Gaurabh,
    For interactive form you have to check the property DisplayType = native and PdfSource should be a Context Attribute of type 'Xstring'.
    For data retrieval, create a NODE and have all the required attributes within that node of AOBE form.
    Fetch the data in WDDOINIT.
    Also check, that the offline senario for this form is working.
    Hope it helps you.

  • Master-Detail Form - only the first detail record is saved in database

    Hello,
    I have created APEX master-detail form with detail tabular form on the same page.
    I tried to enter data to the several detail rows (using Add Row button) and then press Apply Changes button.
    Unfortunately, only the first detail row is being inserted into the database.
    What could be the reason?
    Thanks in advance,
    Erik

    Hi,
    I had a similar problem.
    Problem with addRow(); function in tabular forms - only first line saved
    Maybe it will help to you.
    Regards
    J :D

  • FMB saved in database

    Hi Guru,
    I have been save FMB file into database, and have some problems
    - I dont know how to run the FMX. Can I used ifrun60.exe?
    - How to deploy to my client
    - What the benefits if save into database
    Thanks for help me.
    Guntur Kosasih
    null

    Kosasih
    you can only save fmb in database, but you need to produce fmx file with form builder or form compiler. You cannot run form saved from database.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by guntur kosasih ([email protected]):
    Hi Guru,
    I have been save FMB file into database, and have some problems
    - I dont know how to run the FMX. Can I used ifrun60.exe?
    - How to deploy to my client
    - What the benefits if save into database
    Thanks for help me.
    Guntur Kosasih
    <HR></BLOCKQUOTE>
    null

  • I brought my iphone 4s from canada_____it is in warranty___but now i m in india and iphone "s motherboard got failed___i want to replaced it ___please help me___i m fully sad__ plaese help me apple___

    i brought my iphone 4s from canada_____it is in warranty___but now i m in india and iphone "s motherboard got failed___i want to replaced it ___please help me___i m fully sad__ plaese help me apple___

    amrik81053 wrote:
    i m just student here
    Then you should have done your homework. It clearly states in the warranty at:
    http://www.apple.com/legal/warranty/products/iphone-english-c.html
    IMPORTANT RESTRICTION FOR iPHONE AND iPAD SERVICE.
    Apple may restrict warranty service for iPhone and iPad to the country where Apple or its Authorized Distributors originally sold the device.

  • How to move worksheet saved on database from one instance to another?

    Hi Every one,
    How to move worksheet or workbook saved on database from Discoverer plus from one instance to other instance?
    Is there any way to save a workbook or work sheet on to local drive from discoverer plus.?
    Thanks
    santhosh

    Hi,
    You have 2 options: use Discoverer Administrator to export/import the workbook; or use Discoverer Desktop to save the workbook to the local drive.
    You cannot save a workbook to the local drive using Discoverer Plus.
    Rod West

  • How to make the fields of BPM object not saved in database.

    Is it possible to declare some attributes of BPM object not saved in database.
    For example: Order has attribute orderId and date, user (other attributes)... we only want OBPM save orderId. We want the other attributes could be saved and retrieved by external DAO classes.
    We still want to use the OOTB presentation from BPM object (not the customer jsp).
    Thanks

    When you say:
    Is it possible to declare some attributes of BPM object not saved in database.do you mean you do not want the information stored in the Oracle BPM Engine's database?
    If this is the case, create a BPM Object with just two attributes. One would store your orderId as a primitive data type. The other attribute would be a BPM Object that would store all the other data you are going to retrieve from the external database.
    At the beginning of the screenflow, read the database using the orderId attribute and populate the other attribute (the BPM Object). At the end of the screenflow just before it flows to the end activity, you could set the second attribute (again, the BPM Object attribute) to null. This would keep the BPM object with the two attributes from storing anything but the orderId in the Engine's database table for the work item instance.
    Dan

  • Text fields populated from lov mapping are not saved to database

    Hi Everyone,
    I'm having a wierd problem. My requirement is to autopopulate two text fields field 2 and field 3 when a value is selected from lov in field1 and save all the values to database on click of a submit button.
    Using lov mapping i'm able to populate field 2 and field 3 with corresponding values based on the value selected in field1. And also field2 and field3 should be in the readonly mode so that user cannot change the value.
    So to make the fields readonly i have changed the property of readonly to true for field2 and field3. But if I change the readonly property, the values for field2 and field3 are not being saved to database.
    The values are getting saved to database only when readonly = true for messageTextInput item type or if the item type is a form value.
    I also tried disable = true, which also didnt work.
    I tried to debug by writing some sop statements in PFR, but these statements also returned null for pageContext.getParameter("field2") etc;
    Can anyone please tell me how to solve this problem?
    Thanks
    Sunny

    Hi Gyan,
    I forgot to mention that , I also tried messageStyledText. Which also didn't work. I wanted to use vo.setAttribute as my last option, but i wanted to understand why the values are not saved to database when the text item is showing the values on the page.
    Thanks
    Sunny

  • Workflow message modifications not getting saved into database

    Hello Friends,
    I am working on iProcurement module (11i) and have a requirement to remove the 'View' & 'Edit' links which appear in notification/Emails in Requisition Approval Workflow.
    I found a metalink note "How to Remove Related Application Links From Approval Notifications for AME [ID 1100805.1]" for the same.
    We have to delete some attributes from the workflow message to remove the links but the same is not getting saved in database.
    I am uploading the wft file through Workflow Definition Loader program with the 'force' option. And to check the changes , i am again downloading the file but i could not see the changes.
    Can't attributes be deleted from the message?
    Any suggestions ?
    Thanks...
    Regards,
    Amit

    Hi Hussein,
    Thanks.
    Here are the details :
    RDBMS : 11.2.0.2.0
    Oracle Applications : 11.5.10.2
    OS : Windows XP
    Log :
    Concurrent request completed successfully
    Current system time is 01-DEC-2011 08:29:12
    Oracle Workflow Definition Loader 2.6.4.0.
    Access level: 20, Mode: FORCE
    Uploaded 3 ITEM_TYPE record(s) to database.
    Uploaded 55 LOOKUP_TYPE record(s) to database.
    Uploaded 32 MESSAGE record(s) to database.
    Uploaded 182 ACTIVITY record(s) to database.
    Uploaded 0 ROLE record(s) to database.
    Regards,
    Amit

  • Multi line custom field badly saved to database

    Hello community,
    we're fighting currently against a strange issue.
    All projects has some multi line custom fields to fill every week for project status.
    During this exercise, some of the comments seems not well saved to database.
    While coming back to the PDP, we are seeing a strange behavior :
    Starting from that, I tried to look in the database and the saved html format is badly formatted, you can see a </div> in the middle and a missing one at the end of the sentence:
    <div>Révision et approbation de l&#39;ODS de Facilité.</div> <div>&#160;</div></div> <div>Compléter&#160;le questionnaire à soumettre aux experts.</div>
    <div>&#160;</div> <div>Présentation et choix des experts.
    As of now, we did not find any reason why this is happening.
    While opening back the PDP in edition and saving back ,the problem is solved.
    This is annoying because we are treating the html code as xml for reporting as seen here (http://aboutmsproject.com/converting-rtf-to-text-in-sql-revisited/
    ) and this is crashing because of badly formatted html code
    any advices?
    regards
    Jérome

    Hi Jerome,
    I've seen this issue occur when text is pasted into the field from other applications, like Outlook and Word. I've not yet been able to determine how to get it to stop. The error then causes the invalid XML issue you are seeing. A former co-worker had successfully
    integrated the use of jQuery into PDPs. I'm wondering if they have a HTML clean function.
    Thanks for finding my post useful!
    Treb Gatte, Project MVP, Tumble Road LLC |
    @tgatte | http://AboutMSProject.com

  • Want User Exist or BADI when PO created and saved in database

    Hello Experts,
        I want User Exists or BADI, when PO saved in database table. That is, after Successfully Created message, want user exist or BADI in 4.7 server.
    Thanks & Regards,
    Poonam.

    Hi Friend ,
    Here is the  User Exit & BADI for Purchase Order  on save .I hope it will solve your Query
    User exit  create project  in CMOD : MM06E005
    BADI in SE18 :  ME_PROCESS_PO_CUST
    For more Information please see this SDN LINK : [ME21N /  ME22N SAVE Userexit;
    Regards,
    Edited by: Loganathan girishkumar on Nov 5, 2009 4:31 AM

  • Where does reports get saved in Database

    Hi
    Can anyone please tell me
    1) Where does exactly (in which table) Reports get saved in Database.
    2) Where does Business Area and Its folders get saved in database
    3) How can I modify look and feel and Customize toolbar in discoverer Plus/Viewer other than the default colour scheme provide by discoverer itself.
    Thanks

    Hi
    Though others have answered your first two questions, I would even question why you need to know the exact location / table where these objects get stored.
    You cannot customize the toolbar in Plus - you can change the look and feel by changing the LAF that applies to Plus. To do this, go to the App Server Control (AS Control > Discoverer > Discoverer Plus > Look and Feel) and you can select from one of three out-of-the-box LAFs: System, Plastic, Browser, and Oracle. You can also create your own LAF.
    For Viewer, you can use the App Server control to customize the Look And Feel as well as the Layout of Viewer.
    Thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    Discoverer: http://www.oracle.com/technology/products/discoverer/
    BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
    Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
    BI Samples: http://www.oracle.com/technology/products/bi/samples/
    Blog: http://oraclebi.blogspot.com/

  • Database link help in oracle

    i try to get a resultset from database link but its return empty,so i tried to put the tables in the machine and its successed but with links did not.
    can somebody help me.

    database link help in oracleOr perhaps your do! Whoops.

  • Whn im trying to save contacts manually in iphn 5s aftr 40 contacts it stops saving contacts can anyone help me out

    Whn im trying to save contacts manually in iphn 5s aftr 40 contacts it stops saving contacts can anyone help me out

    Add them Direct via your iCloud (www.icloud...) - Contacts..

  • My ipod 30GB reads---Accessorize test :( PLAESE HELP!!!!!!

    PLEASE HELP ME! My ipodGB reads "accessorize test". below that it says "please plug FW, LCD ID:1, FWPWR:0" what do i do? i can not use it, or plug it into my computer...but the backlight stays on. i have tried to reset it many times. i also do not want to be charged to fix it . plaese help me, im lost without my ipod!

    Interesting, the link you were given has a similar test within it but to get to it you have to reset and then when the apple logo appears hold down the centre and the rev buttons. When you do that the apple logo reverses and you get a list of tests as shown in the link you were given. I'm guessing you haven't done that?
    I haven't ever seen a diagnostic test come up on screen without going into diagnostic mode but perhaps there is some simple test built in just to test accessories.
    Usually with the other tests you just do whatever is asked and you get a pass or fail. You can usually exit by doing a reset where necessary or sometimes by pushing the menu button but you've probably tried that.
    The other option is to do what it asks and see if you can exit by going through them.
    "Please plug FW" means plug in a firewire cable, connected to something probably, so if you have one, plug it in.
    LCD ID:1 simply means your screen is connected.
    FWPWR:0 means that your ipod is not drawing power via a firewire connection.
    If you plug in your firewire cable it should change to a 0.
    It is possible that will be the end of it or alternatively you will get another screen asking you to plug in your usb cable and possibly your head phones and a remote.
    Hopefully the remote test will be optional because you may not have one!
    In these kind of tests a 0 means no or not present and a 1 means yes or working ok or connected.
    Having written all this, probably the quickest way to find out how to stop it is to call Apple!
    If you get a test for the click wheel you will need to scroll it around and around several times until it says pass or possibly in both directions.
    You may get a "key test" which means just push all the buttons.
    Good luck and interested to hear what happens.
    John

Maybe you are looking for