HOW TO Store  Vectors in oracle database

Hello everyone,
In my project, Iam having a Jtable WITH MULTIPLE ROWS AND COLUMNS as my GUI, INWHICH USER TYPES HIS VALUES. THE NUMBER OF ROWS AND COLUMNS ARE SELECTED BY USER WHICH ARE DYNAMIC.
THE PROBELM IS I DON'T KNOW HOW TO STORE EACH ROW VALUES IN DATABASE.I HAVE TO TAKE EACH ROW VALUES AND STORE THEM IN DATABASE. I TAKE EACH ROW AND STORE IT IN A VECTOR. AFTER THAT ONLY THE PROBLEM RAISES.
IS THERE ANY WAY TO STORE VECTORS IN DATABASE.
PLEASE HELP ME IN SOLVING THIS PROBLEM.
THANK YOU.

Bathina,
A "JTable" is usually used to visualize a database table. You seem to want to store a "JTable" in your database. It looks like you may not know much about relational databases.
If you haven't already done so, I suggest reading the "Oracle Concepts" manual. It is available from:
http://tahiti.oracle.com
Good Luck,
Avi.

Similar Messages

  • How to store image in oracle database and retrieve

    Hi i want to store a image in oracle database, user will select the image and i want tht image to store in database in java/jsp can anybody help

    try the following in yr app
    try{
    File fileObject = new File("img path");
    FileInputStream fisObject = new FileInputStream(fileObject);
    PreparedStatement pstmt =
    conn.prepareStatement("insert into IMG_TABLE values (?,?)");
    pstmt.setString(1,fileObject.getName());
    pstmt.setBinaryStream(2,fisObject,(int)fileObject.length());
    pstmt.executeUpdate();
    catch(SQLException se)
    se.printStackTrace();
    catch(Exception ee)
    ee.printStackTrace();
    }

  • How to Store Vector in Oracle8i Database

    Hi Friends,
    I am using Oracle8i database and jdbc2.0. How can I store a vector java object in Oracle8i ....
    Finally I want to store a java vector in a column of a table and while retrieving from the resultset I can typecast it directly to a java Vector type and use... ????
    Any code examples, urls, links will be appreciated.
    Thanks in advance....

    The code below should allow you to write any object you want to a Blob. I am using it to write out the Vector xData and read it back in. Please note, I am using the ByteArrayInputStream and ByteArrayOutputStream classes. Also, the InputStream.available() method returns a null if you try to use it for size. Good Luck
    // create section to test out graphing capability. will generate a vector to plot, generate the plot, try to write it out to
    // a file. Just check that we can perform these actions.
    // Create an option dialog box for user input on what assembly to test
    Vector xData = new Vector();
    Vector recoveredYData;
    JFreeChart chart;
    for(int nCount = 0; nCount < 250; nCount++)
    xData.addElement(new Double(Math.cos(nCount/10.0)));
    try{
    ByteArrayOutputStream baOS = new ByteArrayOutputStream();
    ObjectOutputStream tempObjOS = new ObjectOutputStream(baOS);
    tempObjOS.writeObject(xData);
    tempObjOS.close();
    ByteArrayInputStream baIS = new ByteArrayInputStream(baOS.toByteArray(), 0, baOS.size());
    tempObjOS.close();
    baOS.close();
    int inBytes = baIS.available();
    String holdString = "Insert Into StepResults (SerialNumber, STEPS_ID, OperatorID, Result, RunNumber, TestsID, AssyID) "+
    "VALUES ('0', 0, 0, 'PASS', 0, 0, 0)";
    this.DBConnect.statement.executeUpdate(holdString);
    System.out.println("Execute Query for Update");
    PreparedStatement pstmt = DBConnect.connection.prepareStatement("Update StepResults Set PlotData = ? where AssyID = 0 and TestsID = 0 and RunNumber = 0 and SerialNumber = '0'");
    pstmt.setBinaryStream(1, baIS, baIS.available());
    pstmt.executeUpdate();
    ResultSet rs = this.DBConnect.statement.executeQuery("Select * from StepResults Where AssyID = 0 and TestsID = 0 and RunNumber = 0 and SerialNumber = '0'");
    System.out.println("Try to get data back from database");
    holdString = "Select * from StepResults Where AssyID = 0 and TestsID = 0 and RunNumber = 0 and SerialNumber = '0'";
    rs = this.DBConnect.statement.executeQuery(holdString);
    if(rs != null)
    if(rs.next())
    System.out.println("Check for PlotData in resultSet");
    InputStream is = rs.getBinaryStream("PlotData");
    System.out.println("Bytes available from InputStream: " +inBytes);
    byte newByte[] = new byte[inBytes];
    if(is == null)
    System.out.println("Null Pointer Returned from BinaryStream");
    is.read(newByte, 0, inBytes);
    ByteArrayInputStream baISb = new ByteArrayInputStream(newByte);
    System.out.println("InputStream class: " +is.getClass().toString());
    ObjectInputStream ois2 = new ObjectInputStream(baISb);
    recoveredYData = (Vector) ois2.readObject();
    ois2.close();
    baISb.close();

  • How to store Unicode in Oracle database ?

    I have a J2EE application and currently we are storing the Unicode data in amp;#xxx; format.
    The browser can display this properly but the java swing application cannot. So I need to convert this to \uxxxx format.
    Is it advisable to store the data in the d/b in the \uxxxx format or amp;#xxx; format ? Advantages ? Disadvantages ?
    The database is setup for UTF-8.
    Thanks

    Not really sure what you are asking the conversion from whatever character set to Unicode should occur without thought to decimal or hex. What is the insert statement or method you are using to get the data ineserted into the database?

  • Help: How to open wrapped store procedure on oracle database

    Dear Gurus,
    how to open the wrapped store procedure on oracle database?
    anyone can help me...?
    reply me soon
    take care

    Any other way so that I can see the flow of data that written on wrapped store procedure?You need to see the source code which has keeped outside of database. Read a wrapped code is not common for humans...
    reply me asap If you want an asap answer, raise a SR for oracle support, not through a forum which is based on volunteers.
    Nicolas.

  • How to store España in database (in a column of a table)

    Could you please tell me how to store España in database (in a column of a table).
    regards

    Generally speaking you'll need a character set that can support the characters you require.
    Here is a link to the supported character sets in 10.2.x.x:
    [Character Sets|http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/applocaledata.htm#i635016]

  • How to extract data from oracle database directly in to bi7.0 (net weaver)

    how to extract data from oracle database directly in to bi7.0 (net weaver)? is it something do with EDI? can anybody explain me in detail?
    Thanks
    York

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • How to connect Java to oracle Database Express Edition?

    Anyone can help me?
    How to connect JAVA TO ORACLE DATABASE EXPRESS EDITION?

    I suggest you to read this article:
    http://wiki.oracle.com/page/JDBC
    Regards,
    Ricky

  • How do I get from Oracle Database 8.1.7.0.0 to 8.1.7.2?

    How do I get from Oracle Database 8.1.7.0.0 to 8.1.7.2? There is a patchset that fixes a bug in 8.1.7 for memory leaks that I need installed. I am currently running on a WindowsNT Server with a Oracle Database version of 8.1.7.0.0. Is going to 8.1.7.2 a complete release upgrade, or is there a smaller upgrade to get there, and how do I get the files required>
    Thanks,

    Hi,
    Sorry for my english
    For Windows NT, the last big patchset is 8.1.7.4.x. I advice you to use the last patchset. A patchet is not a upgrade or a migrate. the installation is in two phase. Phase One:Patch the files in the oracle home with Oracle Universal Installer (Oui) and Phase Two: execute sql files on the dictionnary of each database. There is a readme with the patch.
    you can get files on metalink if you have a account (metalink.oracle.com).
    List bug for Memory Corruption
    8174 1748759 Client memory corruption / dump (eg: in ttcfopr) using pre-fetch
    8174 1859905 Intermittent dump / client memory corruption
    8174 1964934 Memory corruption possible using INSERT /*+ APPEND */ over DBLINK
    8174 2126096 Session heap corruption from LIKE :bind ESCAPE '/' if :bind ends in the escape character
    8174 2152752 Memory corruption / OERI:17182 possible fetching CHAR from DB2 over HS
    8174 2217159 13 byte PGA corruption possible using SQL over DBLINKS from PLSQL with MTS to V7 database
    8174 2248904 Memory corrupt possible during optimization of distributed query
    8173 1836101+ Memory Corruption from distributed query / query with binds (OERI:17114/17xxx/dump in kkecdn/kgh*/kke*)
    8173 1542218 Heap corruption (OERI:17182/dump in kghfrf) using very large collections
    8173 1661786 OERI:12261 / single byte memory corruption possible for CALL type triggers
    8173 1711803 DBW & users may CRASH under heavy load on multi-CPU system with FAST_START_IO_TARGET set > 0
    8173 1744786 Cursor work heap corruption from CONNECT BY PRIOR
    8173 1752554 OERI:17182 selecting DB2 DATA TYPE of CHAR over HS
    8173 1791258 CONNECT BY on IOT can cause SGA memory corruption
    8173 1810829 Lightwieght sessions (via proxy connect) may dump / corrupt shadow memory if users have >1 ROLE
    8173 1847583 Client memory corruption/dump using large value_sz for OCIDefineByPos with OCI_DYNAMIC_FETCH
    8173 1968635 OERI:KCOAPL_BLKCHK / buffer cache corruption from CR rollback
    8173 1987654 Compiling a PLSQL block with an INDICATOR clause can corrupt memory
    8173 1995026 OERI:17112 / heap corruption from Oracle Trace with MTS & Large Pool
    8173 2002799 Wrong results / heap corruption from PQ with aggregates in inline view
    8173 2048336 OERI:150 / Memory corruption from interrupted STAR TRANSFORMATION
    8173 2065386 Mem. Corruption / OERI:KGHFRE2 / OERI:17172 possible using bitmap indexes
    8172 1365873 OERI:17182 / CGA corruption with CURSOR_SHARING=FORCE
    8172 1373920 Memory corruption from PLSQL ORA-6502 errors
    8172 1447610 DBMS_SQL.BIND_ARRAY may dump / report private memory corruption type errors
    8172 1679690 Buffer cache in memory corruption (OERI:2032) can lead to permanent data/index mismatch (OERI:12700)
    8172 1732885 oeri:[KDIBR2R2R BITMAP] / memory corruption possible from BITMAP AND
    8172 1763408 RPC between 9i <-> 8i with CHAR data can corrupt memory
    8171 1227384 SGA heap corruption using DBMS_SQL under heavy load (Rare)
    8171 1364542 Buffer Cache corruption possible (rare)
    8171 1394565 PROBE: Callheap corruption printing a RAW in PLSQL debugger
    Bye !!!
    Cordialement
    XsTiaN

  • How do I tune an Oracle database running RequestCenter?

    How do I tune an Oracle database running RequestCenter?
    The details in the following discussion apply to RequestCenter/AlignmentCenter versions 2006 and prior.
    For most efficient operation of ServiceManger, several of the RequestCenter tables must have statistics collected which include histograms.  You can use the SQL commands below to collect the required statistics:
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS StateID SIZE 45;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS PerformerShared, IsBusy, TicketObjectID SIZE 2;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS Waiting, FlagID, EscalationLevel SIZE 3;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS PerformerOfficeID SIZE 75;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS PerformerID SIZE 185;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS CustomerID SIZE 200;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS ActivityFormID, ActivityTypeID SIZE 3;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS ClientOUID SIZE 45;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS NextActionID SIZE 6;
    ANALYZE TABLE TxProcess COMPUTE STATISTICS
        FOR COLUMNS TicketObjectID, EscalationLevel SIZE 3;
    ANALYZE TABLE TxRequisition COMPUTE STATISTICS
        FOR COLUMNS BeingProcessed SIZE 2;
    ANALYZE TABLE TxRequisition COMPUTE STATISTICS
        FOR COLUMNS OrganizationalUnitID SIZE 16;
    ANALYZE TABLE TxRequisition COMPUTE STATISTICS
        FOR COLUMNS StatusID SIZE 6;
    ANALYZE TABLE TxRequisitionEntry COMPUTE STATISTICS
        FOR COLUMNS ServiceID SIZE 32;
    ANALYZE TABLE TxRequisitionEntry COMPUTE STATISTICS
        FOR COLUMNS StatusID SIZE 6;
    ANALYZE TABLE DirPerson COMPUTE STATISTICS
        FOR COLUMNS isOffice SIZE 2;
    ANALYZE TABLE DirPerson COMPUTE STATISTICS
        FOR COLUMNS IsInactive SIZE 2;
    ANALYZE TABLE DirPerson COMPUTE STATISTICS
        FOR COLUMNS TimeZoneID SIZE 6;
    ANALYZE TABLE DirPerson COMPUTE STATISTICS
        FOR COLUMNS SupervisorID SIZE 3;
    ANALYZE TABLE DirPermission[LW1]  COMPUTE STATISTICS
        FOR COLUMNS TargetObjectID SIZE 12;
    ANALYZE TABLE DirPermission COMPUTE STATISTICS
        FOR COLUMNS OwnerObjectID SIZE 4;
    ANALYZE TABLE DirOrganizationalUnit COMPUTE STATISTICS
        FOR COLUMNS OrganizationalUnitTypeID SIZE 4;
    ANALYZE TABLE DefJavascript COMPUTE STATISTICS
        FOR COLUMNS IsGlobalOnLoad, IsGlobalOnSubmit, IsGlobalOnUnload
        SIZE 2;
    ANALYZE TABLE UIEntry COMPUTE STATISTICS
        FOR COLUMNS ObjectID SIZE 7;
    ANALYZE TABLE UIEntry COMPUTE STATISTICS
        FOR COLUMNS UserInterfaceID SIZE 16;

    I thought there will be a magic switch to turn it off and on!That is how Oracle has been since I can remember. You get what you ask for. Does that sound bad?
    Would you want:
    IF ('ABC' = 'Abc')to evaluate to TRUE or FALSE?
    The behaviour seems to be correct. In cases where you want the comparision to be case insensitive, you have several ways to do it. You do it exactly where you need it, not everywhere and all the places.
    The default behaviour would potentially give you one row where as making it case insensitive could potentially give you several rows. now you need to pick one, which one?
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1560806455855#6467925371258

  • How to store an image into database table

    Hi
    Can anyone tell me the way, how to store an image into database table.

    Hello,
    May be this thread will help you in your requirement.
    [FM for uploading Image to SAP;
    Thanks,
    Jayant

  • How to Send SMS from Oracle Database to Mobile

    Hi All,
    I need urgent help in how to send sms from oracle database to mobile
    thanks and best regards

    you can use smslib..... . i have made a program with this. its working fine with oracle database.
    see the links here ...
    http://halimdba.blogspot.com/2011/08/send-sms-from-oracle-database-with.html
    by the way, how you can say "urgent help" ?
    regards
    Halim

  • How can we clone the Oracle database in new Oracle Home

    Hi,
    I would like to clone oracle database into new oracle home. How can we set it using OEM.
    I am using 10g grid control. Target db is on solaris
    Thanks
    Naveen

    after logging into target database, under maintenance tab, data movement header; ther is "clone database" option. When you click on it; you'll see :
    Clone Database uses RMAN to duplicate a database from:
    -- An open database in ARCHIVELOG mode, or
    -- An open database in NOARCHIVELOG mode (restart required), or
    -- A saved working directory from previous cloning
    Clone Database performs the following operations:
    -- Backup each database file and store it in a working directory
    -- Transfer each backup file from source to destination host
    -- Restore each backup file to existing destination Oracle Home
    -- Recover the cloned database with saved archived log files
    -- Open the cloned database with resetlogs
    It seems to be for cloning to a different host, but i guess you can chose the same host for source and destination. (I've never used cloning on em by the way :))
    But firstly, you should create a new oracle home, you can simply copy your oracle home with a new name (cp -R /oracle/app/oracle/product/10.2.0 /oracle/app/oracle/product/10.2.0.new) or make a new installation.
    I suggest you to do this cloning with CLI. You should take a full backup with RMAN, copy the oracle home, create a new initNEWSID.ora file and nomount the database, restore (or simply copy) controlfiles, restore database (with set newname commands), recover database, open resetlogs.

  • How to store any file in database using Forms? EVEN non OLE Compliant

    I have to store and retrieve any file (not only image and OLE compatilble file) in the database and retrieve it later without using Forms and email it using java stored procedure. How do I do that?
    I used OLE, but the problem with this is later when I retrieve it, some OLE specific control information is also retrieved, which means the data stored is not only pure data.
    In the forms, I just want to give the file name and it should store that file into the database as we do with READ_IMAGE_FILE. Is there any way of achieving this?
    Thank you.
    Bijay
    null

    Please refer to this link:
    http://www.dba-oracle.com/t_storing_insert_photo_pictures_tables.htm
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Store Pictures in Oracle databases

    Please anybody can tell about that, how to store pictures or images in oracle database 9i.

    To store pictures in your database you need a table with a BLOB column and one application in oracle forms or java to load them. This code is a web servlet to display photos in a web page:
    package kas.web.interfases.metrics;
    * GetFoto.java
    import java.io.*;
    import java.sql.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.*;
    import oracle.jdbc.driver.OracleDriver;
    public class GetFoto extends HttpServlet {
    public GetFoto() {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    doPost(request, response);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    {   System.out.println("test");
    try {
    DriverManager.registerDriver(new OracleDriver());
    catch(Exception exception) { }
    try {
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@172.21.0.96:1521:PRESIDEN", "kas", "kas");
    Statement stmt = conn.createStatement();
    if(conn != null) {
    String cod = request.getParameter("cod");
    if(cod == null)
    cod = "2";
    String sql = "SELECT emf_foto1 FROM pla_emf_empfoto WHERE emf_codemp=" + cod;
    if(!cod.equals("")) {
    ResultSet rset = stmt.executeQuery(sql);
    try {
    if(rset.next()) {   ////System.out.println("test2");
    Blob ablob = rset.getBlob("emf_foto1");
    response.setContentType("image/gif");
    OutputStream out = response.getOutputStream();
    long bloblen = ablob.length();
    int buffersize = (int)bloblen;
    int bytesRead = 0;
    byte b[] = new byte[buffersize];
    InputStream is = ablob.getBinaryStream();
    while((bytesRead = is.read(b)) != -1)
    out.write(b, 0, bytesRead);
    is.close();
    response.flushBuffer();
    finally {
    rset.close();
    conn.close();
    catch(SQLException sqlexception) {
    System.out.println(sqlexception.toString());

Maybe you are looking for

  • Two images at the same time

    Hi! I'm new into FCE and I would like to ask for some help. Can I work with two images at the same time? I mean, Can I superimpose two images to make one? How can I do it? Maybe this is something easy, but I'm just starting, thanks in advance for you

  • Why is Indesign CS6 not getting an update for retina?

    On several websites I've read al lot of programs will get an update, like Photoshop, Illustrator etc. Why is Indesign excluded?

  • Can I block the blank lines in delivery note?

    Hi Experts, I want to block the blank lines when creating or changing delivery note because  I don't want user to add new items manually. Can I realize such a requirement? Hope anyone can give me some solution. Thanks. Best regards, Chris Gu

  • HT201257 how to start on safe mode

    my macbook air shown white screen after logging in it accept to start and give you option to log in please help

  • Trimming multiple transitions simultaneously.

    Didn't we use to be able to trim multiple transitions simultaneously? For instance, having a cross dissolve on a clip on video track 1 as well as on audio track 1. Selecting both clips and dragging to trim the transition which adjusts both video and