Write n then read xml from database to create graph in an applet

Hi mates
I have one problem I want show a trend(graph) from sql database which is having the records of about 8600 in a day. And i want to show a graph for a day
but sometimes it gives a problem like out-of-memory, so can anyone tell me how i can get read of it.
and other this can i use xml for this means first write a data in xml format from database then read it at sametime and show graph in applet
can anytell me how to do it
any suggesion is appreciable
thanx

Here's are two example for what you are looking for
Re: Load xml data in Oracle table
Re: insert .xml file into xmltype table?
First you need to create a DIRECTORY object.  That is how Oracle works and it expects a DIRECTORY object instead of a physical path when performing operations that read/write from disk.  The directory path provided to the CREATE DIRECTORY command must be a directory that the machine Oracle DB resides on can see.
Then you can go either of two routes.  You can INSERT that XML directly into a table, as shown in the second link I provided or you can read it into PL/SQL as the first link shows.  Then in either case, you can use SQL to parse the XML for you.
Depending upon your needs, you may get better performance if you insert the XML into a table as the second link shows, assuming the XMLType column is stored as SECUREFILE BINARY XML.

Similar Messages

  • Help required in writing And Reading Xml From Database

    Hi
    i m new to java.
    i m facing problem while writing Xml file from Mysql Database in java i m using the WebRowSet
    and also for Reading WebRowSet
    after reading the Xml i have to save this in Database
    (required source code)
    is there any one to help me in this way
    regards
    aamir

    shadab_think_globally wrote:
    {noformat}*hi everybody,
    please send me a ajax with jsp application
    suppose i enter a word in text area ajax will populate/suggest all string from database ,who started
    from that entering character(s).like a google string search.
    please send full source code
    *{noformat}how about you do it yourself?

  • Urgent help with simple BPEL process for reading data from database

    Hello there,
    I need help with BPEL project.
    i have created a table Employee in Database.
    I did create application, BPEL project and connection to the database properly using Database Adapter.
    I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
    Can someone please describe me step by step what i need to do.
    Thx,
    Dps

    I have created a table in Database with data like Empno,name,salary,comments.
    I created Database Connection in jsp page and connecting to BPEL process.
    It initiates the process and it goes automatically for approval.
    Please refer the code once which i created.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import="java.util.Map" %>
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="java.util.Hashtable" %>
    <%@page import="java.util.HashMap" %>
    <%@ page import="java.sql.*"%>
    <%@ page import= "jspprj.DBCon"%>
    <html>
    <head>
    <title>Invoke CreditRatingService</title>
    </head>
    <body>
    <%
    DBCon dbcon=new DBCon();
    Connection conn=dbcon.createConnection();
    Statement st=null;
    PreparedStatement pstmt=null;
    Hashtable env= new Hashtable();
    ResultSet rs = null;
    Map payload =null;
    try
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
    env.put("java.naming.security.principal", "username");
    env.put("java.naming.security.credentials", "password");//bpel console
    Locator locator = new Locator("default","password",env);
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    java.util.HashMap map = new HashMap();
    st=conn.createStatement();
    out.println("connected");
    String query1="Select * from EMPLOYEE";
    rs=st.executeQuery(query1);
    /*reading Data From Database and converting into XML format
    so that no need of going to BPEL console and entering the details.
    while (rs.next()){
    String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
    "<Empno>"+rs.getString(1)+"</Empno>"+
    "<EmpName>"+rs.getString(2)+"</EmpName>"+
    "<Salary>"+rs.getString(3)+"</Salary>"+
    "<Comments>"+rs.getString(4)+"</Comments>"+
    "</AsynchBPELProcess1ProcessRequest>";
    out.println(xml1);
    nm.addPart("payload", xml1 );
    // EmployeeApprovalProcess is the BPEL process in which human task is implemented
    deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
    // payload = res.getPayload();
    out.println( "BPELProcess CreditRatingService executed!<br>" );
    // out.println( "Credit Rating is " + payload.get("payload") );
    //Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
    catch(Exception ee) {
    //("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
    %>
    </body>
    </html>
    Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this.

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • Read XML from a hardware sensor file into ODI

    Read XML from a hardware sensor file into ODI
    Hi,
    I am trying to extract xml data from a flowmeter that generates XML data.
    The xml file is found in http://ip_address/history.xml
    I’ve defined my Topology as such
    JDBC Driver: com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    JDBC URL: jdbc:snps:xml?f=http://192.168.0.202/history.xml&ro=true
    Please note to access the file I have to supply a username and password so I did in the definition But when testing my setup I get an error:
    ava.sql.SQLException: The DTD file "http://192.168.0.202/history.dtd" doesn't exist: Server redirected too many times (20)
    Please note I cannot write dtd to the device as it is a read only device.
    Has anyone came across such an issue, how can I achieve this.
    Thanks
    Hicham

    Hi David,
    Thanks for your reply.
    I've tried this jdbc url
    jdbc:snps:xml?f=http://192.168.0.202/history.xml&d=c:\temp\history.dtd
    but when I test the connection i get the following error
    java.sql.SQLException: While generating the DTD from the XML file, a java.io.IOException exception occurred saying: Server returned HTTP response code: 401 for URL: http://192.168.0.202/history.xml
    If I browse http://192.168.0.202/history.xml and i supply the username and password I get an xml page.
    I've supplied the username and password in the definition tab of the Data Server windows but still getting the above error.
    THanks
    Hicham

  • Generate database schema in XML from database structure

    hi
    I want to generate the entire database schema in XML from database structure. (Same feature is provided by Altova XMLSpy).
    It would be great if there was some API that does the process of parsing the database structure and generating the XML automatically. A similiar feature is provided by Apache DdlUtils' API, but a stable version is not yet available...
    Please help!
    Thanks in advance.

    Nikhil,
    There is a wealth of information available on the Internet regarding the XML capabilities of the Oracle database.
    Have you done an Internet search for "SQL XML Oracle"?
    Good Luck,
    Avi.

  • Labview 2013 are closing when I try read table from database.

    Labview 2013 are closing when I try read table from database.
    I don't get error message, Labview just crashes. I'm use Labview x32 and Database Connectivity Toolkit connective on Windows 7 x64. I connect to PostgreSQL with ODBC driver, connection is stable.
    In my database I have many tables, I can read all them without one.
    When I try read bad table I get data and then labview crash. When I restart Labview I don't have any message about error.
    Also I try use LabSQL-1.1a. But it has same result.
    Solved!
    Go to Solution.
    Attachments:
    DBT.png ‏104 KB
    LabSQL.png ‏67 KB

    Try connecting using UDL file. What operation you are doing with database
    You can create the same.. Do this Tools --> Create Data link..
    Then go to http://www.ni.com/pdf/manuals/371525a.pdf link and see page 3-5. It will help
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

  • Generating XML from database

    I'm a total newbie in XML DB and need advice on generating XML from database.
    The situation is the following: there is a legacy web application which uses an XML document as a configuration file. This document conforms to some well-defined schema. For instance:
    <config>
         <title value="TITLE" />
         <subtitle value="SUBTITLE" />
         <style url="default.css" />
         <widgets>
              <widget id="1" opened="true" />
              <widget id="2" opened="false" />
         </widgets>
    </config>
    It contains portions of static data which are common for all users as well as dynamic personal data.
    Dynamic data comes from two sources:
    1) security considerations (for instance, not all widgets are available for some users) - thus the "master" configuration content must be filtered, but not otherwise modified;
    2) user preferences (for instance, user can set widget2 to be opened by default) - thus values of some attributes must be different for each user. When the user saves her preferences, the entire document with new values is posted back to server.
    We want to try to store user preferences, apply security and generate personalized configuration documents using XML DB.
    So we need advice on storage models and generation procedures - which should be more efficient and easy to support or extend.
    Please note, that there is no requirement to actually store data as XML.
    Thanks in advance!
    P.S.: Sorry for the incomplete initial post.
    Edited by: WxD on 27.09.2010 11:45

    Hi,
    See this link for more details
    http://www.stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10790/xdb13gen.htm

  • How to read data from database to applet

    hi i am writing a program below which reads data from mysql database successfully ;
    import java.sql.*;
    import java.lang.*;
    import java.util.*;
    public class Read_Capital_country_from_database {
    public static void main (String args[] ){
    int index,mess;
    String country_arr[] = new String[250];
    String capital_arr[] = new String[250];
    int i = 0 ;
    String URL = "jdbc:mysql://localhost/allusers";
    String user = "shadab";
    String password ="shadab@123";
    try {
    Class.forName("com.mysql.jdbc.Driver");
    Connection conn = DriverManager.getConnection(URL,user,password);
    for( SQLWarning warn = conn.getWarnings(); warn != null; warn = warn. getNextWarning() )
    System.out.println( "SQL Warning:" ) ;
    System.out.println( "State : " + warn.getSQLState() ) ;
    System.out.println( "Message: " + warn.getMessage() ) ;
    System.out.println( "Error : " + warn.getErrorCode() ) ;
    String sql = "select * from country_capital";
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(sql);
    while( rs.next() ) {
    System.out.println( rs.getString(1) );
    System.out.println(" " +rs.getString(2) );
    System.out.println();
    catch (SQLException se){
    System.out.println( "SQL Exception:" ) ;
    System.out.println("Exception - raju");
    while( se != null )
    System.out.println( "State : " + se.getSQLState() ) ;
    System.out.println( "Message: " + se.getMessage() ) ;
    System.out.println( "Error : " + se.getErrorCode() ) ;
    se = se.getNextException() ;
    catch( Exception e )
    System.out.println( e ) ;
    java Read_Capital_country_from_database
    OUT PUT OF ABOVE PROGRAM IS :
    INDIA NEW DELHI
    PAKISTAN ISLAMABAD
    AFGHANISTAN KABUL
    BUT SAME PROGRAM WHEN I GO TO WRITE IN APPLET
    THIS TIME APPLET DOES OPEN BUT ERROR SHOWS ON STANDARD OUT PUT
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    THIS IS THE PROGRAM WRITTEN FOR JAVA APPLET
    import java.sql.*;
    import java.lang.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class Read_Capital_country_from_database extends Applet {
    Choice country, capital;
    String msg=" ", msg1;
    int index,mess;
    String country_arr[] = new String[250];
    String capital_arr[] = new String[250];
    char chr;
    int i = 0;
    public void init() {
    country = new Choice();
    capital = new Choice();
    String URL = "jdbc:mysql://localhost/allusers";
    String user = "shadab";
    String password ="shadab@123";
    try {
    Class.forName("com.mysql.jdbc.Driver");
    Connection conn = DriverManager.getConnection(URL,user,password);
    for( SQLWarning warn = conn.getWarnings(); warn != null; warn = warn. getNextWarning() )
    System.out.println( "SQL Warning:" ) ;
    System.out.println( "State : " + warn.getSQLState() ) ;
    System.out.println( "Message: " + warn.getMessage() ) ;
    System.out.println( "Error : " + warn.getErrorCode() ) ;
    String sql = "select * from country_capital";
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(sql);
    while( rs.next() ) {
    country_arr[i] = rs.getString(1);
    country.add(country_arr);
    capital_arr[i] = rs.getString(2);
    capital.add(capital_arr[i]);
    i++;
    catch (SQLException se){
    System.out.println( "SQL Exception:" ) ;
    System.out.println("Exception - raju");
    while( se != null )
    System.out.println( "State : " + se.getSQLState() ) ;
    System.out.println( "Message: " + se.getMessage() ) ;
    System.out.println( "Error : " + se.getErrorCode() ) ;
    se = se.getNextException() ;
    catch( Exception e )
    System.out.println( e ) ;
    add(country);
    add(capital);

    It doesn't make sense to read a database directly from an applet. If an applet needs data from a database is should request if from the server which the applet is located on and the server should do the actual database actions.
    The whole point of applets is that they require no installation on the client machine. If you have to change policy files or the like, you might as well install a Swing application. Furthermore accessing a database tends to depend on how the client is set up on the network. Any sensible network has firewall settings that block access to the database ports to any external access (and, again, if you are limiting the facility to a few internal machines then why not just install a program on them).

  • Read XML from remote server

    Not sure if this is even possible.
    I am using APEX on a INTERNAL server, on the same network is another server hosting files.
    Using PL/SQL code, I need to read the XML file.
    So APEX/ORACLE is at http:\\server1\apex\f?p........
    And the files are at \\server2\xml\file.xml
    Can I load the xml from server2 using pl/sql in server1?
    The XML is generated automatically from another system and can not be stored on the APEX server. It does not need to go into the database, just read, parced, and displayed.

    Hi,
    Using PL/SQL code, I need to read the XML file. You can create a directory object pointing to the location on server2 :
    CREATE DIRECTORY xml_dir AS '\\server2\xml';then you can access the XML content like this :
    DECLARE
    v_xml_doc xmltype;
    BEGIN
    v_xml_doc := xmltype(bfilename('XML_DIR', 'file.xml'), nls_charset_id('CHAR_CS'));
    -- XML processing here...
    END;
    /

  • Reading XML from Oracle directory to generate charts

    Hi,
    I have a requirement create graphs, charts and maps based on data from a data warehouse (dw).  As I see things, there are two possibilities:
    Graphs, charts and maps based on an XML file
    Graphs, charts and maps based on Oracle tables
    Both would contain small data sets that will allow for quick response.  The intent of these graphs, charts and maps is to generate a dashboard that would allow the user to quickly drill down to the desired warehouse data.
    The proof of concept has already been validated using the Oracle table scenario.  My question is whether or not this could be accomplished reading xml files for generating the same set of dashboard items?
    My Oracle database and APEX environments configuration are as follows:
    NLSRTL                 11.2.0.1.0                                                           Production
    Oracle Database 11g Enterprise Edition 11.2.0.1.0                         64bit Production
    PL/SQL 11.2.0.1.0                                                                            Production
    TNS for Solaris: 11.2.0.1.0                                                               Production
    Application Express 4.2.2.00.11
    APEX Listener Release 2.0.2.  / Tomcat
    An Oracle database directory has been setup and is accessible to our APEX application.
    Any suggestions/help is appreciated.
    Thanks,
    Charles

    An Oracle Directory has an underlying OS directory associated with it, Oracle just overlays it's control structure onto an existing folder in the OS. You can manipulate the files with stored procedures in Oracle or at the OS level from outside of Oracle.
    If you manipulate the files from the OS level, outside of Oracle, you may need a refresh of the Oracle Directory structure.

  • How to read XML from web page inside servlet/jsp ?

    i have a url, which on sending request, shows XML in browser.
    Now i need to read this XML in browser and then manipulate it according to my need and display it on another page.
    actually the process is. :
    1) i have to first retrieve an xml from other site. (XML will only be shown in browser)
    2.)then i have to read the Xml and show it in according to my requirements.
    Is there any way to read XML directly from a Web Page ??
    is their logic to accomplish this.
    e.g in Servlet i can do somewhat like this :
    String wholeXml=Somemethod(url);
    Please Advice

    Hi,
    if u wanna extract data from XML. you can use Digester(Apache-jakarta) parser. All u need to create the beans(as per the data in xml), that will be populated by Digester.
    Digester takes xml(string) as parameter and populates the bean specified.
    U can use this bean in ur JSP.
    :::Note:::; use Digester in ur servlet.
    for more read:::
    http://www.onjava.com/pub/a/onjava/2002/10/23/digester.html
    I hope it shall work..
    @mit

  • Read XML from applet

    Hi there,
    I would like to read XML data from Applet,
    first of all is it possible?
    If yes then how and will I require any extra pugin other than Java Plug-in?
    Thanks

    Sure you can, as long as the applet has permissions to read the xml file. If it is in the same directory as the applet it should be ok.
    There is no need for an extra plugin. Here's a starting point:
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(<some stream>);
    Element data = doc.getDocumentElement();
    NodeList dbChildren = db.getChildNodes();

  • Read xml from SQL Server

    Hello
    I need to read a xml from a sql server 2000 database. The field in the database is declare as text.
    When a try to read <a>3</a> the database adapter returns something like this.
    /a/3//a/.
    How do I solve the problem?
    Thanks
    Gonçalo Ribeiro

    Hello again.
    I'm using ora:parseEscapedXML to convert the string that contains XML into XML.
    I'm doing it in an assign. My doubt is what kind of variable should received the information?
    Thanks
    Gonçalo Ribeiro

  • Read xml from https

    Hi experts,
    I need to read a XML from https address,i have no idea to make it possible, any idea?
    points for all
    thanks all.

    Hi,
    It is secure link at XI end need to configure SSL else it is not possible.  We can read data through HTTP & SOAP adapter.
    Find below links for more help.
    http://help.sap.com/saphelp_nw04/helpdata/en/14/ef2940cbf2195de10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f7/c2953fc405330ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/ef2940cbf2195de10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/964f67ec-0701-0010-bd88-f995abf4e1fc
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/23894238-0701-0010-40b0-a0a6d5c4ad9f?prtmode=navigate

Maybe you are looking for

  • Functional specs for generating Report.

    < MODERATOR:  All points have been UNASSIGNED and the message locked.  Please do not share email addresses, documents, or links to copyrighted or company confidential information on these forums. > Hi This is Sunil garg Sd consultant. Can any body pr

  • Capturing using a dvd player

    It's not capturing my dvd footage and it's not on "Non controlable devices" It's on Firewire NTSC. So what now?

  • FIGL Process Chain

    Hi Friends ! In our system, we have the following FIGL DSO's Cubes. I want to make a process chain on FIGL. Query is do we have any data sequence? or we can load in parallel? Please advise. Average Daily Balances (Direct) 0FIGL_V60  Cost of Sales Led

  • How can i edit a adobe document

    hi

  • Data storage & Table structure in BW/BI

    Hi Experts,                 I know that when we create an infocube and load data it gets stored in BI server, here my question is where does the data exactly get stored in depth in the server and i would like to know the table structure of the data t