How to put blob data in OS (help!?)

hi,
I am a beginner in oracle. Now i use sql*loader and put some jpg,rm files in blob(jpg->blob) , but,in reverse, i don't know how to extract blob and put it in my OS(blob->jpg).......>_<
thanks
d.t.

Hi All,
after searching lot on SDN, i found out that OLE concepts can not be used in WD ABAP environment. Please let me know if i am correct or not.
as of now, i am building the excel and using below method to create it.
*Create the Excel File
  cl_wd_runtime_services=>attach_file_to_response(
  i_filename = lv_filename
  i_content = lv_xstring
  i_mime_type = 'application/msexcel'
  i_in_new_window = abap_false
  i_inplace = abap_false ).
The problem in above method is  that, i can not format the excel as i wanted. for e.g. i wanted to put values in particular cell, make it BOLD, italic etc.
Is there any way to achive this? Please let me know.
Thanks,
Chandra

Similar Messages

  • How to put blob to external file (Help!?)

    hi,
    I am a beginner in oracle. Now i use sql*loader and put some jpg,rm files in blob(jpg->blob) , but,in reverse, i don't know how to extract blob and put it in my OS(blob->jpg).......>_<
    thanks
    d.t.

    Just photos?
    File -> Export
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    Move the Library?
    Make sure the drive is formatted Mac OS Extended (Journaled)
    1. Quit iPhoto
    2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    Regards
    TD

  • How to put time&date on photos

    How to put time&date on photos

    There is a Photoshop Scripting Forum
    http://forums.adobe.com/community/photoshop/photoshop_scripting?view=discussions
    where this threads for example
    http://forums.adobe.com/message/3640570#3640570
    can be found.

  • How to convert BLOB data into string format.

    Hi,
    I have problem while converting blob data into string format.
    for example,
    Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
    will get me the first 4000 byte of BLOB .
    When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
    declare
    my_var CLOB;
    BEGIN
    for x in (Select X from T)
    loop
    my_var:=dbms_lob.substr(x.X,32767,1)
    end loop
    return my_var;
    I comfortably convert 32k BLOB field to string.
    My problem is how to convert blob to varchar having size more than 32K.
    Please help me to resolve this,
    Thanx in advance for the support,
    Nilesh

    Nilesh,
    . . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
    SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
    -- resulting string:
        ☺AW(⌂özßHAA
    Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
    Regards,
    Noel

  • How to put current date time in a JTextField?

    Hi all,
    I have a problem. How can I put current date time in a JTextField? Pls help me!
    Thank you!

    Hi all,
    I have a problem. How can I put current date time in
    a JTextField? Pls help me!
    Thank you!http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTextField.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html

  • How to put the data into cache and distribute to nodeusing oracle coherence

    Hi Friends,
    i am having some random number data writing into file,from that file i am reading the data and i want to put into cache,how can i put the data into cache and partition this data into different nodes ( machines) to caluculate like S.D,variance..etc..like that.(or how can i implement montecarlo using oracle coherence) if any one know plz suggest me with flow.
    Thank you.
    regards
    chandra

    Hi robert,
    i have some bulk data in some arraylist or object format,i want to put into cache.
    i am not able to put into cache.i am using put method like cache.put(object key ,object value) ,but its not allowing to put into cache.
    can you please help me.i m sending my code.plz go thru and tel me whr i did mistake.
    package lab3;
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    import com.tangosol.net.cache.NearCache;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.PrintWriter;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Random;
    import java.util.Scanner;
    import javax.naming.Name;
    public class BlockScoleData {
         * @param args
         * s=The spot market price
         * x=the exercise price of the option
         * v=instantaneous standard deviation of s
         * r=risk free instantaneous rate of interest
         * t= time to expiration of the option
         * n – Number of MC simulations.
         private static String outputFile = "D:/cache1/sampledata2.txt";
    private static String inputFile = "D:/cache1/sampledata2.txt";
    NearCache cache;
    List<Credit> creditList = new ArrayList<Credit>();
         public void writeToFile(int noofsamples) {
              Random rnd = new Random();
              PrintWriter writer = null;
              try {
                   writer = new PrintWriter(outputFile);
                   for (int i = 1; i <= noofsamples; i++) {
                        double s = rnd.nextInt(200) * rnd.nextDouble();
                        //double x = rnd.nextInt(250) * rnd.nextDouble();
                        int t = rnd.nextInt(5);
                        double v = rnd.nextDouble() ;
                        double r = rnd.nextDouble() / 10;
                        //int n = rnd.nextInt(90000);
                        writer.println(s + " " + t + " " + v + " "
                                  + r );
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } finally {
                   writer.close();
                   writer = null;
    public List<Credit> readFromFile() {
    Scanner scanner = null;
    Credit credit = null;
    // List<Credit> creditList = new ArrayList<Credit>();
    try {
    scanner = new Scanner(new File(inputFile));
    while (scanner.hasNext()) {
    credit = new Credit(scanner.nextDouble(), scanner.nextInt(),
    scanner.nextDouble(), scanner.nextDouble());
    creditList.add(credit);
    System.out.println("read the list from file:"+creditList);
    } catch (FileNotFoundException e) {
    e.printStackTrace();
    } finally {
    scanner.close();
    credit = null;
    scanner = null;
    return creditList;
    // public void putCache(String cachename,List<Credit> list){
    // cache = CacheFactory.getCache ( "VirtualCache");
    // List<Credit> rand = new ArrayList<Credit>();
    public Object put(Object key, Object value){
    cache = (NearCache)CacheFactory.getCache("mycache");
    String cachename = cache.getCacheName();
    List<Credit> cachelist=new ArrayList<Credit>();
    // Object key;
    //cachelist = (List<Credit>)cache.put(creditList,creditList);
    cache.put(creditList,creditList);
    System.out.println("read to the cache list from file:"+cache.get(creditList));
    return cachelist;
         public static void main(String[] args) throws Exception {
         NearCache cache = (NearCache)CacheFactory.getCache("mycache");
              new BlockScoleData().writeToFile(20);
         //new BlockScoleData().putCache("Name",);
              System.out
                        .println("New file \"myfile.csv\" has been created to the current directory");
         CacheFactory.ensureCluster();
         new BlockScoleData().readFromFile();
    System.out.println("data read from file successfully");
         List<Credit> creditList = new ArrayList<Credit>();
    new BlockScoleData().put(creditList,creditList);
         System.out.println("read to the cache list from file:"+cache.get(creditList));
    //cache=CacheFactory.getCache("mycache");
    //mycacheput("Name",new BlockScoleData());
    //     System.out.println("name of cache is :" +mycache.getCacheName());
    //     System.out.println("value in cache is :" +mycache.get("Name"));
    //     System.out.println("cache services are :" +mycache.getCacheService());
    regards
    chandra

  • How to Get Blob data(In String Form) using OCCI

    Hello frnds,
    I am new to OCCI,so i hvnt that much of master in that side.
    I have one problem while handling BLOb data.
    How to convert binary form of SDO_GEOMETRY data into string format. I am able to convert data by using PLSQL block,but its take so much time to execute.So performance is the main issue.So if there is any API in OCCI which convert directly blob data into string format.
    Thanx in advance for your support,
    Nilesh.

    Have you tried reading "http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28390/lobs.htm#BABDEGJD" ? This explains how you can read from BLOBs into a C vector (or C++ vector of chars).

  • How to Restrict Master data in value help screen for a user???URGENT

    Hello Gurus,
    I have a requirement.When a authorized user logins to view the report, he should see only list of customers assigned to that user in the value help screen, instead of displaying whole master data.and the data is displayed perfectly fine for the authorized sales rep. By default, Value help screen displaying all the customer numbers.
    How can I restrict in the value help screen?
    Any help appreciated with points.
    Regards,
    PNK

    Hi Chandran,
                I got that Idea too. I created a authorized customer, I created a authorized Object and assigned to a role.But in the role, when I am changing the object to generate profile, it is asking to select list of customers from the customer table.If the customers are always constant then this would work,  but in my scenario, customers for the sales rep changes over time and when I ever reps open the query, they should see updated list of customers assigned to them only, as we update the master data everyday from source system and that shud reflect in the value help.
    I am trying User Exit to achieve this, but I am not getting proper ideas how to do this.
    Any Help on this issue with user exit code???
    Thanks in Advance
    regards,
    PNK

  • How to convert blob data into clob using plsql

    hi all,
    I have requirement to convert blob column into clob .
    version details
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE     11.1.0.7.0     Production
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    DECLARE
       v_blob      temp.blob_column%TYPE;------this is blob data type column contains  (CSV file which is  inserted  from screens)
       v_clob      CLOB; --i want to copy blob column data into this clob
       v_warning   NUMBER;
    BEGIN
       SELECT blob_column
         INTO v_blob
         FROM temp
        WHERE pk = 75000676;
       DBMS_LOB.converttoclob (dest_lob          => v_clob,
                               src_blob          => v_blob,
                               amount            => DBMS_LOB.lobmaxsize,
                               dest_offset       => 1,
                               src_offset        => 1,
                               blob_csid         => 1, -- what  is the use of this parameter
                               lang_context      => 1,
                               warning           => v_warning
       DBMS_OUTPUT.put_line (v_warning);
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line (SQLCODE);
          DBMS_OUTPUT.put_line (SQLERRM);
    END;I am not getting what is the use of blob_csid , lang_context parameters after going the trough the documentation .
    Any help in this regard would be highly appreciated .......
    Thanks
    Edited by: prakash on Feb 5, 2012 11:41 PM

    Post the 4 digit Oracle version.
    Did you read the Doc for DBMS_LOB.CONVERTTOCLOB? - http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_lob.htm
    The function can convert data from one character set to another. If the source data uses a different character set than the target you need to provide the character set id of the source data.
    The blob_csid parameter is where you would provide the value for the source character set.
    If the source and target use the same character set then just pass zero. Your code is passing a one.
    >
    General Notes
    You must specify the character set of the source data in the blob_csid parameter. You can pass a zero value for blob_csid. When you do so, the database assumes that the BLOB contains character data in the same character set as the destination CLOB.
    >
    Same for 'lang_context' - your code is using 1; just use 0. It is an IN OUT
    >
    lang_context
    (IN) Language context, such as shift status, for the current conversion.
    (OUT) The language context at the time when the current conversion is done.
    This information is returned so you can use it for subsequent conversions without losing or misinterpreting any source data. For the very first conversion, or if do not care, use the default value of zero.

  • How to Scramble BLOB data stored in Tables

    I have received a directive from the top management, in their drive to comply with security standards, that BLOB data stored in the database ( e.g., Word, Excel, PDF, .... documents) needs to be scrambled in DEV environment.
    I have written up a routine which will scramble CHAR/VARCHAR/NUMBER, as this sounded more logical to me.
    But, have come to a stand-still in figuring out how to scramble binary data??????
    Is this at all possible? To me, it sounds impossible, but I'm open to ideas.
    Has anyone out there thought up of a solution to this?
    If so, please do advice.
    Eager to know.

    Hello Dave & BluShadow,
    Thanks for your responses.
    So, 10g is the answer huh.... That's not going to make people jump with joy, at least they'll hold off on this for now. My other possible alternative, is to have one dummy BLOB each of Word Doc, Excel, PDF, ... and overwrite each actual file attachment with the dummy. I know... I know.. not the best.
    Regarding the management stuff... Hmm... This entire thing comes up because of the policy of refreshing the DEV / TEST environments with the actual production data. They've been doing this for a long long time.... The Good side to this is that they've taken the step in the right direction on this one, though I wish it would have been to totally avoid doing this kind of a refresh and use test data.
    Thanks again. Do let me know if there's anyother alternative too.

  • How to put the data from one excel sheet in another excel sheet

    hi ,
    I want put the data from one excel sheet in another excel sheet in seq. order Eg: I have one excel sheet in which i have 3 col. Name , Sno. , Email along with data .I want to put data from this sheet to another excel sheet in the following orders of col. Sno,Name, Email .
    While loading data in another sheet , i have to perform validation like char field should n't contain numeric values and vice versa .
    Let me know on this soon ..
    regards
    Prashant

    Well, you can issue separate queries with the ordering you need from each tab in the spreadhseet. You can open an ODBC connection from a VBA macro, select a sheet, run a query, select another sheet and run another query. As for the validation, you can do this in Oracle via stored procedures or again in VBA code.

  • How to load blob data into table

    hi
    i have a table with
    ID     NUMBER     No     -      1
    PARENT_ID     NUMBER     No     -      -
    DOCUMENT     BLOB     Yes     -      -
    NAME     VARCHAR2(40)     Yes     -      -
    MIMETYPE     VARCHAR2(40)     Yes     -      -
    COMMENTS     VARCHAR2(400)     Yes     -      -
    TIMESTAMP_CREATED     TIMESTAMP(6)     Yes     -      -
    CREATED_BY     VARCHAR2(40)     Yes     -      -
    TIMESTAMP_MODIFIED     TIMESTAMP(6)     Yes     -      -
    MODIFIED_BY     CHAR(40)     Yes     -      -
    IS_GROUP     CHAR(1)     No     -      -
    FILE_NAME     VARCHAR2(4000)     Yes     -      -
    as columns. i want to insert blob data into the empty table.i have some fields in the form through which i insert data by hard coding in a process.when i upload a document in the filebrowse type field the mime type is not updating though i have written code in the source value. i removed the database links of the form with the table and that is why i am hard coding to the table thru a process. could u suggest a query where i can insert the blolb data.
    i use the process
    begin
    select max(ID) into aaa from "PSA_KNOWLEDGE_TREE";
    insert into PSA_KNOWLEDGE_TREE values(aaa+1,1,null,:p126_NEW_GROUP,null,:p126_COMMENTS,:P126_TIMESTAMP_CREATED,:P126_CREATED_BY,null,null,'Y',null);

    could u please type the query according to my table and process requirements. i have tried many queries and i have failed to load the blob data. the imetype is not being updated.
    thnx for ur reply

  • How to handle blob data with java and mysql and hibernate

    Dear all,
    I am using java 1.6 and mysql 5.5 and hibernate 3.0 . Some time i use blob data type . Earlier my project's data base was oracle 10g but now i am converting it to Mysql and now i am facing problem to save and fetch blob data to mysql database . Can anybody give me the source code for blob handling with java+Mysql+Hibernate
    now my code is :--
    ==================================================
    *.hbm.xml :--
    <property name="image" column="IMAGE" type="com.shrisure.server.usertype.BinaryBlobType" insert="true" update="true" lazy="false"/>
    ===================================================
    *.java :--
    package com.shrisure.server.usertype;
    import java.io.OutputStream;
    import java.io.Serializable;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Types;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.BLOB;
    import org.hibernate.HibernateException;
    import org.hibernate.usertype.UserType;
    import org.jboss.resource.adapter.jdbc.WrappedConnection;
    import com.google.gwt.user.client.rpc.IsSerializable;
    public class BinaryBlobType implements UserType, java.io.Serializable, IsSerializable {
    private static final long serialVersionUID = 1111222233331231L;
    public int[] sqlTypes() {
    return new int[] { Types.BLOB };
    public Class returnedClass() {
    return byte[].class;
    public boolean equals(Object x, Object y) {
    return (x == y) || (x != null && y != null && java.util.Arrays.equals((byte[]) x, (byte[]) y));
    public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
    BLOB tempBlob = null;
    WrappedConnection wc = null;
    try {
    if (value != null) {
    Connection oracleConnection = st.getConnection();
    if (oracleConnection instanceof oracle.jdbc.driver.OracleConnection) {
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    if (oracleConnection instanceof org.jboss.resource.adapter.jdbc.WrappedConnection) {
    InitialContext ctx = new InitialContext();
    DataSource dataSource = (DataSource) ctx.lookup("java:/DefaultDS");
    Connection dsConn = dataSource.getConnection();
    wc = (WrappedConnection) dsConn;
    // with getUnderlying connection method , cast it to Oracle
    // Connection
    oracleConnection = wc.getUnderlyingConnection();
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    tempBlob.open(BLOB.MODE_READWRITE);
    OutputStream tempBlobWriter = tempBlob.getBinaryOutputStream();// setBinaryStream(1);
    tempBlobWriter.write((byte[]) value);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    tempBlob.close();
    st.setBlob(index, tempBlob);
    } else {
    st.setBlob(index, BLOB.empty_lob());
    } catch (Exception exp) {
    if (tempBlob != null) {
    tempBlob.freeTemporary();
    exp.printStackTrace();
    st.setBlob(index, BLOB.empty_lob());
    // throw new RuntimeException();
    } finally {
    if (wc != null) {
    wc.close();
    public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
    final Blob blob = rs.getBlob(names[0]);
    return blob != null ? blob.getBytes(1, (int) blob.length()) : null;
    public Object deepCopy(Object value) {
    if (value == null)
    return null;
    byte[] bytes = (byte[]) value;
    byte[] result = new byte[bytes.length];
    System.arraycopy(bytes, 0, result, 0, bytes.length);
    return result;
    public boolean isMutable() {
    return true;
    public Object assemble(Serializable arg0, Object arg1) throws HibernateException {
    return assemble(arg0, arg1);
    public Serializable disassemble(Object arg0) throws HibernateException {
    return disassemble(arg0);
    public int hashCode(Object arg0) throws HibernateException {
    return hashCode();
    public Object replace(Object arg0, Object arg1, Object arg2) throws HibernateException {
    return replace(arg0, arg1, arg2);
    =================================================================
    can anyone give me the source code for this BinaryBlobType.java according to mysql blob handling ..

    Moderator action: crosspost deleted.

  • How to compare BLOB data in 9i between 2 tables

    Hi
    I need to compare data between two tables (which are the same structure across two schemas) which has BLOB data.
    I am using 9i so cannot use some of the new functionality provided in 10g and 11g.
    I was hoping I could, rather primatively, use the dbms_utility.get_hash_value function and compare has values.
    Running this works:
    select
    dbms_utility.get_hash_value( to_char('1'), 0, 1073741824 )
    from dual
    DBMS_UTILITY.GET_HASH_VALUE(TO
                         201884475but this doesn't:
    select
    dbms_utility.get_hash_value( to_blob('1'), 0, 1073741824 )
    from dual
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'GET_HASH_VALUE'Is there anyway to manage this?
    Thanks

    Or
    SQL> select   dbms_utility.get_hash_value (
                utl_raw.cast_to_varchar2 (to_blob ('1')),
                0,
                1073741824
             ) hash_value
      from   dual
    HASH_VALUE
    833483443
    1 row selected.

  • Since up date to Yosemite my iphoto 6000  pics are in chaos, 2011 pics mixed in 2014. Not always in event block sometimes just one or two?  Does anyone know how to put this right...help!

    Since upgrade to Yosemite my iphoto 6000+ pics are in chaos.  2011 mixed in with 2014 some in blocks, then many just random one or two pics. Event absolutely all over the place, over 5 years.  Can anyone help please? 

    Hello!
    See if you can solve this via the View-menu:

Maybe you are looking for