HOW TO  CAST NVARCHAR2 TO BLOB

Hello
i must stock my data to a nvarchar2 data (unicode) and i must also make full text search on this column, oracle does not support full text search on unicode data, so i have decided to stock my unicode data to a blob clomun, after i can create a full text index and search data.
my problem is how to cast nvarchar2 to blob in oracle. i'm using a vb program with adodb to write and read data from the db and i must write the data (unicode text) in the blob column using the right cast which allows me to use directly adodb to read information (i have tried this with sql server with a varbinary(max) column and it works : i write a nvarchar data to the verbinary(max) column using the cast function, after, adodb can read directly the information without any explicit cast) is this possible on oracle
thank you for your help

What is your database character set? If it's AL32UTF8 you shouldn't really need to use NVARCHAR2 at all - you can store Unicode data in a VARCHAR2 or CLOB column.
BLOB doesn't seem like the right datatype to use - if it's text you want to index then it should be in a VARCHAR2 or a CLOB column. If you put it in a BLOB then you'll have to explicity tell Oracle not to treat it as a binary document, and you will have to handle all character set issues manually.
I'm afraid I know nothing about VB or ADODB.

Similar Messages

  • How to cast a BLOB to OrdImage

    Hi,
    How can I cast or convert a BLOB to OrdImage? For example,
    <import...>
    public class ConvertBlobToOrdImage {
    public static void main(String args[]) throws Exception {
    // Load the Oracle JDBC driver:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // Connect to the database:
    Connection conn =
    DriverManager.getConnection(<"Your database connection">);
    conn.setAutoCommit(false);
    // Create a Statement:
    Statement stmt = conn.createStatement();
    String query = "SELECT blob FROM image_t where image_id = 1";
    OracleResultSet rset = (OracleResultSet) stmt.executeQuery(query);
    rset.next();
    OrdImage imageProxy = (OrdImage) rset.getCustomDatum(1, OrdImage.getFactory()); // <-- java.lang.ClassCastException: oracle.sql.BLOB
    rset.close();
    int height = imageProxy.getHeight();
    int width = imageProxy.getWidth();
    System.out.println("Image Dimension: " + height + " x " + width);
    System.out.println("Image Mime Type: " + imageProxy.getMimeType());
    TIA,
    Henry

    xwindy wrote:
    Does anyone knows how to cast a HashMap to HashMap<String, Object>?
    the session.getAttribute return only a HashMapthere is no way to do this safely
    you can use this annotation to suppress unchecked warnings
    @SuppressWarnings("unchecked")

  • How to cast an Object into a specific type (Integer/String) at runtime

    Problem:
    How to cast an Object into a specific type (Integer/String) at runtime, where type is not known at compile time.
    Example:
    public class TestCode {
         public static Object func1()
    Integer i = new Integer(10); //or String str = new String("abc");
    Object temp= i; //or Object temp= str;
    return temp;
         public static void func2(Integer param1)
              //Performing some stuff
         public static void main(String args[])
         Object obj = func1();
    //cast obj into Integer at run time
         func2(Integer);
    Description:
    In example, func1() will be called first which will return an object. Returned object refer to an Integer object or an String object. Now at run time, I want to cast this object to the class its referring to (Integer or String).
    For e.g., if returned object is referring to Integer then cast that object into Integer and call func2() by passing Integer object.

    GDS123 wrote:
    Problem:
    How to cast an Object into a specific type (Integer/String) at runtime, where type is not known at compile time.
    There is only one way to have an object of an unknown type at compile time. That is to create the object's class at runtime using a classloader. Typically a URLClassloader.
    Look into
    Class.ForName(String)

  • How to cast vector to vector with out using loop. and how to override "operator =" of vector for this kind of condition.

    Hi All How to TypeCast in vector<>...  typedef  struct ...  to class... 
    //how to cast the vector to vector cast with out using loop
    // is there any way?
    //================ This is Type Definition for the class of ClsMytype=====================
    typedef struct tagClsMytype
    CString m_Name;
    int m_Index;
    double m_Value;
    } xClsMytype;
    //================ End of Type Definition for the class of ClsMytype=====================
    class ClsMytype : public CObject
    public:
    ClsMytype(); // Constructor
    virtual ~ClsMytype(); // Distructor
    ClsMytype(const ClsMytype &e);//Copy Constructor
    // =========================================
    DECLARE_SERIAL(ClsMytype)
    virtual void Serialize(CArchive& ar); /// Serialize
    ClsMytype& operator=( const ClsMytype &e); //= operator for class
    xClsMytype GetType(); // return the typedef struct of an object
    ClsMytype& operator=( const xClsMytype &e);// = operator to use typedef struct
    ClsMytype* operator->() { return this;};
    operator ClsMytype*() { return this; };
    //public veriable decleare
    public:
    CString m_Name;
    int m_Index;
    double m_Value;
    typedef struct tagClsMyTypeCollection
    vector <xClsMytype> m_t_Col;
    } xClsMyTypeCollection;
    class ClsMyTypeCollection : public CObject
    public:
    ClsMyTypeCollection(); // Constructor
    virtual ~ClsMyTypeCollection(); // Distructor
    ClsMyTypeCollection(const ClsMyTypeCollection &e);//Copy Constructor
    DECLARE_SERIAL(ClsMyTypeCollection)
    virtual void Serialize(CArchive& ar);
    xClsMyTypeCollection GetType();
    ClsMyTypeCollection& operator=( const xClsMyTypeCollection &e);
    ClsMyTypeCollection& operator=( const ClsMyTypeCollection &e); //= operator for class
    void Init(); // init all object
    CString ToString(); // to convert value to string for the display or message proposed
    ClsMyTypeCollection* operator->() { return this;}; // operator pointer to ->
    operator ClsMyTypeCollection*() {return this;};
    public:
    vector <ClsMytype> m_t_Col;
    //private veriable decleare
    private:
    //===================================================
    ClsMytype& ClsMytype::operator=( const xClsMytype &e )
    this->m_Name= e.m_Name;
    this->m_Index= e.m_Index;
    this->m_Value= e.m_Value;
    return (*this);
    //==========================Problem for the vector to vector cast
    ClsMyTypeCollection& ClsMyTypeCollection::operator=( const xClsMyTypeCollection &e )
    this->m_t_Col= (vector<ClsMytype>)e.m_t_Col; // how to cast
    return (*this);
    Thanks in Advance

    Hi Smirt
    You could do:
    ClsMyTypeCollection* operator->() {
    returnthis;};
    // operator pointer to ->
    operatorClsMyTypeCollection*()
    {returnthis;};
    public:
    vector<ClsMytype>
    m_t_Col;//??
    The last line with "vector<xClsMytype>
    m_t_Col;". It compiles but I doubt that is what you want.
    Regards
    Chong

  • How to display image in blob field in ResultSet in SiteStudio?

    I am running Site Studio 10gR4. For a custom page, I created a component that basically runs a query. The structure of the underlying data is a combination of Varchar2, Date and a single BLOB field. The blob field either contains a simple jpeg image, or nothing.
    In my Page where I am looping through the data, how do I display the blob as an image?
    Currently the code looks like this:
         <!--$loop SQLRoutes-->
              <tr>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 0))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 1))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 2))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 3))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 4))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 5))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6))--></td>
              </tr>
         <!--$endloop-->Field 1 is a blob and fields 5 and 6 are dates.
    So really two questions:
    1. How do I display field1 as an image?
    Example:
    <!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 1))-->doesn't do it. Is there a different function then getValue() that I should be using to get the blob contents?
    2. I want to compare the date fields to todays date, and either change the color or conditionally display the fields. I could do this with basic taglibs from jsp. How do I do this with IDocScript?
    Example:
    <!--$if getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6)) > dateCurrent-->
      <span class="red"><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6))--></span>
    <!--$endif-->Thanks, Ken

    I actually don't know the answer to #1. If I were to guess, there's nothing out-of-the-box to handle blobs, so your best option is to write your own idoc function. Take a look at the How To component if you don't know how.
    For #2, you almost have it right. Insert bold:
    &lt;!--$if <b>parseDate(formatDate(</b>getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6))<b>)) gt</b> dateCurrent<b>()</b>--&gt;
    &lt;span class="red"&gt;<!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6))-->&lt;/span&gt;
    <!--$endif-->

  • How much space does a blob use?

    How much space does a BLOB use?
    Does it use allocated anyspace if its empty?

    It will size appropriately:
    TEST.SQL>CREATE TABLE TBLOB
      2  (
      3  A BLOB
      4  ) TABLESPACE _SANITIZED_;
    TABLE CREATED.
    TEST.SQL>SELECT INITIAL_EXTENT FROM DBA_TABLESPACES WHERE TABLESPACE_NAME='_SANITIZED_';
    INITIAL_EXTENT
           5242880
    TEST.SQL>SELECT * FROM DBA_EXTENTS WHERE SEGMENT_NAME='TBLOB';
    OWNER                          SEGMENT_NAME                                                                      PARTITION_NAME                 SEGMENT_TYPE
    TABLESPACE_NAME                 EXTENT_ID    FILE_ID   BLOCK_ID      BYTES     BLOCKS RELATIVE_FNO
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                  0         16    1201289    5242880        640           16
    TEST.SQL>SELECT * FROM DBA_OBJECTS WHERE CREATED > SYSDATE-1;
    OWNER                          OBJECT_NAME
    SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE        CREATED  LAST_DDL TIMESTAMP           STATUS  T G S
    YJAM                           SYS_LOB0000920875C00001$$
                                       920876         920876 LOB                14:41:36 14:41:36 2005-11-16:14:41:36 VALID   N Y N
    YJAM                           TBLOB
                                       920875         920875 TABLE              14:41:36 14:41:36 2005-11-16:14:41:36 VALID   N N N
    TEST.SQL>SELECT * FROM DBA_EXTENTS WHERE SEGMENT_NAME='SYS_LOB0000920875C00001$$';
    OWNER                          SEGMENT_NAME                                                                      PARTITION_NAME                 SEGMENT_TYPE
    TABLESPACE_NAME                 EXTENT_ID    FILE_ID   BLOCK_ID      BYTES     BLOCKS RELATIVE_FNO
    YJAM                           SYS_LOB0000920875C00001$$                                                                                        LOBSEGMENT
    _SANITIZED_                                  0         16    1202569    5242880        640           16
    TEST.SQL>DECLARE
      2    VALINS VARCHAR2(4000);
      3  BEGIN
      4    VALINS:='1';
      5    FOR I IN 1..100000
      6    LOOP
      7      INSERT INTO TBLOB VALUES (RPAD(VALINS,4000,'0'));
      8    END LOOP;
      9  END;
    10  /
    PL/SQL procedure successfully completed.
    TEST.SQL>COMMIT;
    Commit complete.
    TEST.SQL>SELECT * FROM DBA_EXTENTS WHERE SEGMENT_NAME IN ('SYS_LOB0000920875C00001$$','TBLOB');
    OWNER                          SEGMENT_NAME                                                                      PARTITION_NAME                 SEGMENT_TYPE
    TABLESPACE_NAME                 EXTENT_ID    FILE_ID   BLOCK_ID      BYTES     BLOCKS RELATIVE_FNO
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                  0         16    1201289    5242880        640           16
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                  1         17    1169929    5242880        640           17
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                  2         18    1163529    5242880        640           18
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                  3         19    1176969    5242880        640           19
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                  4          5     379529    5242880        640            5
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                  5         14     375689    5242880        640           14
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                 51         18    1172489    5242880        640           18
    YJAM                           TBLOB                                                                                                            TABLE
    _SANITIZED_                                 52         19    1191689    5242880        640           19
    YJAM                           SYS_LOB0000920875C00001$$                                                                                        LOBSEGMENT
    _SANITIZED_                                  0         16    1202569    5242880        640           16
    54 rows selected.
    TEST.SQL>ANALYZE TABLE TBLOB COMPUTE STATISTICS;
    Table analyzed.
    TEST.SQL>SELECT * FROM DBA_TABLES WHERE TABLE_NAME='TBLOB';
    OWNER                          TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                         PCT_FREE   PCT_USED
    INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT
    AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANA PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
    DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS
    YJAM                           TBLOB                          _SANITIZED_                                                                                               10
             1        255        5242880     5242880           1  2147483645            0                            YES N     100000      33547          373       1977          0
           2042                         0                   0          1          1     N ENABLED       100000 14:51:22 NO               N N NO  DEFAULT DISABLED NO  NO
                    DISABLED NO                                 DISABLED DISABLED
    TEST.SQL>SELECT BYTES/1024 FROM DBA_SEGMENTS WHERE SEGMENT_NAME='TBLOB';
    BYTES/1024
        271360   
    TEST.SQL>TRUNCATE TABLE TBLOB;
    Table truncated.
    TEST.SQL>BEGIN
      2    FOR i IN 1..100000
      3    LOOP
      4      INSERT INTO TBLOB VALUES ('1');
      5    END LOOP;
      6  END;
      7  /
    PL/SQL procedure successfully completed.
    TEST.SQL>COMMIT;
    Commit complete.
    TEST.SQL>ANALYZE TABLE TBLOB COMPUTE STATISTICS;
    Table analyzed.
    TEST.SQL>SELECT BYTES/1024 FROM DBA_SEGMENTS WHERE SEGMENT_NAME='TBLOB';
    BYTES/1024
          5120Note: there is a deported blob segment for the pointers I forgot in my previous post.
    HTH,
    Yoann.
    Message was edited by:
    Yoann Mainguy
    Hmm, forgot that for a full comparison of the avg linesize:
    TEST.SQL>SELECT * FROM DBA_TABLES WHERE TABLE_NAME='TBLOB';
    OWNER                          TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                         PCT_FREE   PCT_USED
    INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT
    AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANA PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
    DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS
    YJAM                           TBLOB                          _SANITIZED_                                                                   10
             1        255        5242880     5242880           1  2147483645            0                            YES N     100000        628           12       1223          0
             41                         0                   0          1          1     N ENABLED       100000 14:56:56 NO               N N NO  DEFAULT DISABLED NO  NO
                    DISABLED NO                                 DISABLED DISABLED         

  • How to cast an object in JSF?

    I am working on a travel application. A user can have several bookings and a booking can have several components. A component can be either air or hotel. I want to list the user's bookings on the client using JSF datatable.
    <h:dataTable var="component" value="#{booking.components}">
    Now depending upon the class of component I need to present different information.
    My question is how to cast the variable in JSF ?
    Thanks

    You can use the String value of Object#getClass()#getName() to lookup the classname and evaluate it in the 'rendered' attribute.
    Basic example:
    package mypackage;
    public class Animal {}
    package mypackage;
    public class Cat extends Animal {}
    package mypackage;
    public class Dog extends Animal {}
    package mypackage;
    public class Fish extends Animal {}MyBeanpublic List<Animal> getList() {
        List<Animal> animals = new ArrayList<Animal>();
        animals.add(new Dog());
        animals.add(new Cat());
        animals.add(new Fish());
        return animals;
    }JSF<h:dataTable value="#{myBean.list}" var="item">
        <h:column>
            <h:outputText value="It's a Cat" rendered="#{item.class.name == 'mypackage.Cat'}" />
            <h:outputText value="It's a Dog" rendered="#{item.class.name == 'mypackage.Dog'}" />
            <h:outputText value="It's a Fish" rendered="#{item.class.name == 'mypackage.Fish'}" />
        </h:column>
    </h:dataTable>As far there is no way to cast objects in JSF.
    Edit
    If you find it useful, move the classname request to the superclass:
    public class Animal {
        public String getType() {
            String className = getClass().getName();
            return className.substring(className.lastIndexOf('.') + 1);
    }Which makes life easier without struggling with package names:<h:outputText value="It's a Cat" rendered="#{item.type == 'Cat'}" />
    <h:outputText value="It's a Dog" rendered="#{item.type == 'Dog'}" />
    <h:outputText value="It's a Fish" rendered="#{item.type == 'Fish'}" />Message was edited by:
    BalusC

  • How to copy one column BLOB value into another column of another database.

    How to copy one column BLOB value into another column of another database.
    BLOB value contains word document.
    I thought of copy the BLOB value into a text file and then update the new column value by the same text in textfile. Will this work?
    Is there any other better way to do this?

    You're welcome
    BLOB fields contains binary data. I don't think you can do this
    Also if I view the BLOB as text. Can I copy it and insert into the new database.
    I think your options are as I said. Datapump or CTAS
    Best Regards

  • How to convert CLOB to BLOB with SQL Developer migration wizard?

    Hi,
    According to our requirement, we need to only migrate data from SQL Server 2008 to Oracle 11. I use the SQL Developer 3.0.04 migration wizard to do it.
    I do migration from SQL Server (database name: SCDS41P2) to Oracle (User name: HCDS41P2).
    My migration steps are as below: (I need to modify the target schema, so I add the steps 2) and step 3) )
    1) Do migration by SQL Developer migration wizard;
    2) Remove the Converted Database Objects node from migration project;
    3) Re-do convert by SQL Developer migration wizard (contains changing the target schema);
    When do step 1), the DBO_SCDS41P2 user is created automatically. CLOBTOBLOB_SQLDEVELOPER procedure is also created in this user.
    I continued to run step 2) and step 3) with online mode. And find the table data which contains BLOB column can be moved into the target table. But from the Logging Page, I can't see the other detailed error info, so that I can't check which tables don't move data successfully.
    Could you please tell me where the detail log file (e.g. contains every table's migration status) is if I use the online mode?
    Additional, If I use offline mode to do step 3), I found the CLOB data can't be converted into BLOB automatically. Because in the load script (that is oracle_ctl.bat), only copy the source data to the CLOB column. After copy, it don't deal with the converting from CLOB to BLOB.
    So could you please tell me how to convert CLOB to BLOB with offline mode?
    Thanks so much.

    Hi,
    For your first question about logging - after the migration there will be an entry in the right hand panel for the migration project. If you open this there are various fields that give information about the status of each part of the migration. Does this give you the information you need ?
    For the second problem about offline moving blob data have a look at the SQL*Developer documentation -
    Oracle® SQL Developer User’s Guide Release 3.0
    in the section -
    2.2.8.1.4 Populating the Destination Database Using the Data Files
    which describes the problem and how to get round it.
    Regards,
    Mike
    Edited by: mkirtley on Aug 12, 2011 10:49 AM

  • How to use clob or blob data type in OWB

    how to use clob or blob data type in OWB?
    if OWB not surport these data type,how can i extract the large data type from data source

    The same question was asked just two days ago No Data Found: ORA-22992
    Nikolai Rochnik

  • How can I make Azure blob give me "206 Partial content" for mp4. Getting 200

    I want a video for my web-site, so I am using html+JavaScript found on view-source:https://www.airbnb.com/ 
    see id="pretzel-video"
    and script starting from   var video = $("#pretzel-video");
    The point is - if I copy html+JavaScript on my web-site, I can get "206 Partial content" from  airbnb.com, i.e. the video hosted on airbnb.com starts streaming immediately. 
    The same thing happens if I upload the same video to my domain hosted on arvixe.com and S3 Amazon
    The only provider that doesn't give me 206, but responds with 200 instead is Azure blob
    This is unacceptable, because the user has to wait until all the video is loaded.
    So how can I make Azure blob give me  "206 Partial content". I am hosting web-site on Azure also. 
    I am using airbnb.com video in all three cases to exclude possible errors related to codek etc.

    Hi Chao 
    Azure Blob storage  supports return 206 response if you're using API version 2011-01-18 or later . 
    However if
    don't originate the request which means you can't specify this using the request header , you can set the API version globally
    for blob service within  a storage account by using " Set
    Blob Service Properties" API , 
    If the above still couldn't solve your issue, we suggest you please contact Microsoft Azure technical support for further assistance.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Regards,
    Serena Yu
    Microsoft Online Community Support

  • How to cast ArrayList to ....

    Hi,
    I got an ArrayList and its values are (1,2,3)
    List tempList = new ArrayList();
    tempList.add("1");
    tempList.add("2");
    tempList.add("3");
    I am wondering how to convert it to an int [] array.
    int [] tempInt;
    I know that I can do this : tempList.toArray
    but I don't know how to cast this to int[] type of array
    (note: not integet [] , just int[])
    Can anyone help? thanks a lot.

    Note: It would be much more efficient to use the wrapper classes for storing primitives in a Vector/ArrayList/LinkedList/... :
    tempList.add(new Integer(1));
    tempList.add(new Integer(2));
    tempList.add(new Integer(3));
    (getting the array as an int[] still requires a for-loop)

  • How to cast object type to integer type?

    Hi,
    Object [] temp;
    Int [] value;
    How can I assign temp to value? (value = temp?)
    In other words how to cast array of type object to array of type integer?
    Thanks a lot.

    Hi,
    Object [] temp;
    Int [] value;
    How can I assign temp to value? (value = temp?)
    In other words how to cast array of type object to
    array of type integer?
    Thanks a lot.That my friend, is (sometimes) illegal. other times use
    value = (Integer[]) temp;
    Pray that temp is holding an Integer array so that you dont throw a runtime exception.
    I am assuming you know the diff between "int" and "Integer".

  • How to cast presentation variable

    Hi,
    How to cast the presentation variable in answers
    Thanks in advance
    naresh

    Hi Naresh,
    Have you tried to use the CAST function?
    CAST(@{test}{123} as char)
    With the above column Formula in Answers Request I can able to view the result 123, which is the default value specified the presentation variable 'test'.
    Hope this will helps you..
    -Vency

  • How to File Convert to Blob? help me

    Hey Guys...........
    How to convert inputStream to blob ????
    kit = new RTFEditorKit();
    Document doc = kit.createDefaultDocument();
    InputStream is = getUploadedFile().getInputStream();
    DCIteratorBinding iterTemplate = ADFUtils.findIterator("TemplateVOIterator");
    Row currentRow = iterTemplate.getCurrentRow();
    String templateId = currentRow.getAttribute("Id").toString();
    currentRow.setAttribute("TemplateFile", ????); in here Blob file....
    "is" convert to blob ???
    Regards Ninja,
    Edited by: Ninja on Jul 21, 2011 7:04 PM
    Edited by: Ninja on Jul 21, 2011 11:39 PM

    Timo Hahn wrote:
    Well, it's all in the sample Frank pointed you to:
    //your code
    kit = new RTFEditorKit();
    Document doc = kit.createDefaultDocument();
    InputStream is = getUploadedFile().getInputStream();
    DCIteratorBinding iterTemplate = ADFUtils.findIterator("TemplateVOIterator");
    Row currentRow = iterTemplate.getCurrentRow();
    String templateId = currentRow.getAttribute("Id").toString();
    currentRow.setAttribute("TemplateFile", newBlobDomainForInputStream(is)); in here Blob file....
    private BlobDomain newBlobDomainForInputStream(InputStream in) throws SQLException, IOException {
    BlobDomain b = new BlobDomain();
    OutputStream out = b.getBinaryOutputStream();
    writeInputStreamToOutputStream(in,out);
    in.close();
    out.close();
    return b;
    private static void writeInputStreamToOutputStream(InputStream in, OutputStream out) throws IOException {
    byte[] buffer = new byte[8192];
    int bytesRead = 0;
    while ((bytesRead = in.read(buffer, 0, 8192)) != -1) {
    out.write(buffer, 0, bytesRead);
    }TimoI can new method..... This is GOOD..
    *> kit = new RTFEditorKit();*
    *> Document doc = kit.createDefaultDocument();*
    *> InputStream is = getUploadedFile().getInputStream();*
    byte[] bytes = IOUtils.toByteArray(is);
    Blob blob = new SerialBlob(bytes);
    currentRow.setAttribute("TemplateFile", blob);
    like
    Edited by: Ninja on Jul 28, 2011 10:59 PM

Maybe you are looking for

  • Error while creating Business Partner in Collections Management

    Hello All, I am trying to create Business partners for Customers in Collections Managment, specific to country Luxemburg. The error I am getting says that, 'Tax number category LU2 does not exist' and 'There is no BAPI field to screen field assignmen

  • Can't create aggregate device?

    Can anyone help me here, I know exactly how to create an aggregate device but when I go to hit the check boxes for various ins/outs it flashes like it worked for a second then appears back where it was on the list, unchecked. I have no idea what the

  • Dynamic Formatting of jsp

    How do i format elements in a jsp dynamically in a jsp. For ex <td width=100% colspan=18> <%= titleName %> </td>Instead of specifying colspan as 18, i want it to automatically adjust according to the length of the word (titleName). Thank You

  • Gmail Password Reset

    I'm hoping someone can help! Until today, I was receiving and sending emails on my BlackBerry just fine. This morning, I thought it was a good time to change my gmail password, and did so on my laptop. Then noticed I wasn't getting my emails and real

  • Check if a cell contains specific text

    I am trying to do a check to see if a cell contains specific text (but may also include other text). I thought this might be accomplished with an 'if' statement. Is this possible in Numbers?