How to insert serialized object in database

What must be the type of database field column. It must be binary or what

not recommending doing it, but you can play around with ByteArray and Objerct streams, get the byte array into a String. store the string in the database table, and read it back as a string, getBytes and 'reconstitute' the objects like normal serializing.

Similar Messages

  • How To Insert A object into Conext

    Hi Techies,
    I have 8 tables in my designer
    and I have two contexts at designer level
    And how to insert a object into a context that is not referencing any table.
    For Example I have an object like "rownum" (Which should must be added at Universe level only not at report level). Here this object is not referencing any table and I want this to be used in a query where the remaining objects are coming from the context..
    Thanks in Advance..

          Double-click the Objects and click the TABLES button and select the table you want to associate the object to for the context to work properly (see below).
    Regards,
    Ajay

  • How to insert serial Number in BI Publisher Report

    Hi All,
        I want to insert serial numbers in BI Publisher report.
    For Example:
       SNO
         1
         2
         3
         4
    I tried below code in XML file...but i confused where i need to add these code in XML file
    <?xdoxslt:set_variable($_XDOCTX, 'var', 0)?>
    <?xdoxslt:set_variable($_XDOCTX,'var', xdoxslt:get_variable($_XDOCTX,'var‘)+1)?>
    <?xdoxslt:get_variable($_XDOCTX, 'var')?>
    Can anybody explain detail steps........
    Regards,
    Nagaraju M

    Use <?position()?> in your RTF template when you display your records..
    I believe if you search for posts on this forum, you will find several threads with similar requirement.
    Thanks,
    Bipuser

  • How to insert, select image from database

    can any one help me to store and retrive image from mySQL database....
    plz can any one send me code for this ?
    thank you

    First of all, I suggest not to do this!! Creates to much overhead on your database. Especially if you have large images that your going to put in the database.
    Otherwise what you could do is create a BLOB that contains the bytes to your image and insert that into your database.

  • How to insert Transition object into html document

    Hello Friends,
    I am trying to insert Transition object ( downloaded from
    Extension) into HTML document.
    I tried Insert -> HTML -> Head Tags -> Transitions,
    but after doing all this I am not able to insert
    this extension in my document.
    As I am beginner to Dreamweaver, Can anyone pls. help me out?
    I am using Dreamweaver 8.
    Do I need to select <img> tag before inserting
    Transition Object?
    Pls. pls. help me out.....
    Waiting for reply.
    Thanks in advance for your help.

    When I used to do tabs I would set up a page that was as wide as the tab sheet including the tab, then add text frames in each tab position.

  • How to pass serialized object and the string through the socket together?

    I have an application which listens on a port and I usually read string lines from it. Now I want to pass serialised object through it , plus I should indicate (using some string like "object coming") tht the following packet is a serialized object.

    Since Strings are serializable you could just send a stream of serialized objects then you don't have to know anything about the format.

  • How  to  insert data into custom database table from an hcsf

    i want to insert data into database table that i have created from an hcsf.
    example :
    say i have created a table in oracle database and i hav created a hcsf file.now i want that when somebody fills in that hcsf and click submit ,i want that entries should be updated in my database table.
    plzzz reply ASAP(it's urgent)

    you'll need a bit of Java code... extract the data during a check-in filter, and insert it into the database.
    check out the "DataAccess" component in the HowToComponents for query-running examples, and the "DynamicPrefix" component for a check-in filter example.
    I have older copies here:
    http://bezzotech.com/library

  • How to insert an object into an object array

    I have an array of objects and im trying to insert an object into the array at position zero. Does anyone know what method I can use for this?

    Hey,
    Are u using a normal array or an array list ?
    For instance if you are using a normal array and you wnat to store an object of classX it should be something like this:
      myArray[0] = new classX(vlaue1, Value2, Value3);this will only work if you have a default constructer for the objects.
    I am posting under correction here but this is the basic idea.
    Hope it helps :-)

  • How to insert a row in database trough AappModule

    HI,
    I have used below code for getting details from databse. Now i have to insert a row in the database.
    Kindly let me know how can i use below code for inserting a row in the database. or should i make any change in its viewObject's Query.
    If there is any another way of inserting data in database through method binding please let me knoe that.
    ApplicationModule myService = ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
    ViewObject userInfoVO = myService.findViewObject("EmployeeViewParam1");
    userInfoVO.executeQuery();
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EmployeeViewParam1Iterator");
    RowSetIterator rowIter1 = dcItteratorBindings.getRowSetIterator();
    Row[] rows1 = rowIter1.getAllRowsInRange();
    for(int i=0;i<rows1.length;i++)
    this.empId = (String)rows1.getAttribute("EmployeeId"); // primary key
    this.employeeName = (String)rows1[i].getAttribute("Employeename");
    Thanks and Regards,

    HI,
    i have tried belod code. for this i have made AppModuleImpl Class and wrote below method in that and called this method from my bean class with help of AppModuleImpl's Object.
    public void createEmployee (){
    ViewObjectImpl employee=getEmployeeView1();
    // ViewObject employee= findViewObject("EmployeeView");
    Row row = employee.createRow();
    row.setAttribute("Employeeid",189420);
    row.setAttribute("Employeename","Test");
    //Insert row in to the default row set
    employee.insertRow(row);
    but it is giving nullPointerException at line Row row = employee.createRow();
    Kindly help me to shortout this.

  • How to insert Serialised Object(XML DOM) into Oracle Table(as BLOB or CLOB)

    we need a urgent help. How can we insert and retrieve the XML Document DOM Object into Oracle Table.Actually we used BLOB for insert the DOM Object,its inserted finely but we have a problem in retrieving that object, we got error when v're retrieving. so could you anyone tell us what's this exact problem and how can we reslove this problem If anyone knows or used this kind operation, pls let us know immediately.
    Thanks in advance.

    Please repost your question in the appropriate XML forum, http://forums.oracle.com/forums/index.jsp?cat=51

  • How to insert serial numbers in the creation of a delivery via VL01N

    Hello everybody,
    In the creation of an outbound delivery via VL01N I have to copy the serial number from a specific inbound delivery. I can get these serial numbers but I do not know where or how I can insert these serial numbers.
    I have to insert them just after the user press enter in the first screen of VL01N (before the delivery number is created) I cannot use a bapi like BAPI_OUTB_DELIVERY_CHANGE because the delivery is not created yet.
    Could anybody tell me how to do it? Any BAdI/Exit I can use? and which internal table I shoud update?
    Thanks a lot.

    But this is impossible! Believe me! When I open Creative Cloud.app, the window which pops out says :
    ===========================================
    APPLICATIONS INSTALLEES (= Installed applications)
    Indesign CC (2014) ----- A jour (= up-to-date)
    Acrobat XI pro ----- A jour (= up-to-date)
    TROUVER DE NOUVELLES APPS (= Find new apps)
    Photoshop CC (2014) ----- Installer (Install)
    etc., etc.
    ===========================================
    In the second part of the window, you have already installed apps, as Photoshop, which have not been updated as well as apps I have never installed, as Scout CC.
    So it is impossible to install Indesign anew.
    When I click on the small gear, a small window opens up, and I can check that in Preferences/Apps that the "Langue de l'app", that is the "Language of the app" is "English plus hebrew (some hebrew characters)
    ", since i made this choice yesterday, as you told me.
    And nevertheless, the Creative Cloud.app does not want to download any new Indesign application.
    It is not possible to ask the people at Adobe who have designed CC.app?
    Thank you,
    André Bellaïche

  • How to insert data in to database table depends on Indicator

    Hi All,
    I am working on Idoc to JDBC scenario. I am collecting & bundling(Using BPM) all the idocs and inserting the data in to the different database tables. Up to now my scenario is working fine. Now the problem is before inserting the data I have to check one of the Table field. If the field indicator is u201CYESu201D then only I have to insert data otherwise I have to wait up to the indicator field needs to be changed. Once indicator is u201CYESu201D then I have to insert all the collected idocs in to the database tables.
             Can you please let me know how can I achieve this?
    Thanks & Regards,
    Purushotham

    Hi,
    There are two ways you can achieve this.
    1. Instead of directly calling SQL statements write a stored procedure on database which will have first select query and then based on its result fire the insert query.For processing any logic like this stored procedure is the best approach. You can call SP from your jdbc receiver channel
    2. By using a BPM. In this case you have to first fire a select query in the database and based on the response from database, fire the insert statement from bpm only. basically you will be having 2 send steps to database. One with Select statement and another with insert statement. You need to handle your logic in BPOM in this case.
    Hope this answers your question.
    Thanks
    Amit

  • How to serialize a object to DataBase?

    A feasible way is that serialize the object to a file and then store this file to database. But I want to achieve it directly. How could I do?

         * Convert a serializable object to a byte array.
         * @param serializable Object to convert.
         * @return Byte array or null if failed.
         * @throws IOException on error.
        static public byte[] toByteArray(Serializable serializable) throws IOException {
            byte[] result = null;
            if (serializable != null) {
                ObjectOutputStream oos = null;
                try {
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    oos = new ObjectOutputStream(baos);
                    oos.writeObject(serializable);
                    result = baos.toByteArray();
                } finally {
                    if (oos != null) {
                        oos.flush();
                        oos.close();
            }//else: input unavailbel
            return result;
        }//toByteArray()
    byte[] ba = toByteArray(mySerializableObject);
    ByteArrayInputStream bais = new ByteArrayInputStream(ba);
    preparedStatement.setBinaryStream("BINDATA", bais, ba.length)

  • How to insert date into oracle database

    Hi, there,
    I want to insert date information to oracle database in a jsp page using JSTL. but always got wrong message:
    javax.servlet.jsp.JspException:
    INSERT INTO DATE_TEST
    (date_default,date_short,date_medium)
    values(?,?,?)
    : Invalid column type
    I don't know how to convert java date type to oracle date type or vice versa. the following is the source code(all the fields of DATE_DEFAULT,DATE_SHORT,DATE_MEDIUM are oracle date type. and even I want to insert d instead d1, I got the same wrong message)
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.util.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <%
    Calendar now;
    Calendar rightNow = Calendar.getInstance();
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <h2>
    The current time is:
    </h2>
    <p>
    <%= new java.util.Date() %></p>
    <%
    java.util.Date d=new java.util.Date();
    java.sql.Date d1=new java.sql.Date(d.getYear(),d.getMonth(),d.getDate());
    out.print(d1.toString());
    %>
    <sql:update>
    INSERT INTO DATE_TEST
    (DATE_DEFAULT,DATE_SHORT,DATE_MEDIUM)
    VALUES(?,?,?)
    <sql:dateParam value="${d}" type="date" />
    <sql:dateParam value="${d}" type="date" />
    <sql:dateParam value="${d}" type="date" />
    </sql:update>
    </body>
    </html>
    thank you very much for the great help!!

    Hi, there,
    I want to insert date information to oracle database in a jsp page using JSTL. but always got wrong message:
    javax.servlet.jsp.JspException:
    INSERT INTO DATE_TEST
    (date_default,date_short,date_medium)
    values(?,?,?)
    : Invalid column type
    I don't know how to convert java date type to oracle date type or vice versa. the following is the source code(all the fields of DATE_DEFAULT,DATE_SHORT,DATE_MEDIUM are oracle date type. and even I want to insert d instead d1, I got the same wrong message)
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.util.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <%
    Calendar now;
    Calendar rightNow = Calendar.getInstance();
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <h2>
    The current time is:
    </h2>
    <p>
    <%= new java.util.Date() %></p>
    <%
    java.util.Date d=new java.util.Date();
    java.sql.Date d1=new java.sql.Date(d.getYear(),d.getMonth(),d.getDate());
    out.print(d1.toString());
    %>
    <sql:update>
    INSERT INTO DATE_TEST
    (DATE_DEFAULT,DATE_SHORT,DATE_MEDIUM)
    VALUES(?,?,?)
    <sql:dateParam value="${d}" type="date" />
    <sql:dateParam value="${d}" type="date" />
    <sql:dateParam value="${d}" type="date" />
    </sql:update>
    </body>
    </html>
    thank you very much for the great help!!

  • How to find out object / schema / database level replication is active

    Hi,
    I am an experienced DBA but new to streams and I am asked to support an existing streams configuration between two Oracle 10g databases. I was told it is bi-directional but one database is standby and it never took traffic. My questions are
    1. How will I find out whether it is a database or schema level replication? Any queries that I can run to find it out?
    2. How do I find out it is bi-directional and it iis current. What queries I can run to confirm?
    3. How will I find out the excluded objects? Any queries please...
    Thanks for the help
    Regards
    Rama

    http://www.morganslibrary.org/reference/dyn_perf_view.html#dyst
    SELECT name FROM dba_dependencies
    WHERE referenced_name = 'DBMS_STREAMS_ADM' AND name LIKE 'DBA%'
    UNION
    SELECT referenced_name FROM dba_dependencies
    WHERE name = 'DBMS_STREAMS_ADM' AND referenced_name LIKE 'DBA%';

Maybe you are looking for