How to create a ClobDomain object with a default's different charset.

Hi,
I'm developing a 10.1.3. ADF Faces application that need to upload a File to a CLOB column. The user will usually upload a text file CP1252 charset, but in samples like this:
// read data into a character array
char[] data = {'0','1','2','3','4','5','6','7','8','9'};
// write the array of character data to a CLOB
writer = ((CLOB)my_clob).getCharacterOutputStream();
writer.write(data);
writer.flush();
writer.close();
The writer object is always a defaults charset writer.
Does anybody knows how to do this?
Thanks,
Edited by: Samuel Fisch on 05/01/2010 02:06

Samuel,
My understanding is that unicode should be able to hold all possible characters codes. So you upload something in unicode, store it in the db and later on view it from the db you should see the contents of the clob (in the default encoding of your pc).
The question for me is if the db can store all character codes. this is not the case if you use an oracle db and have not set the db character code to unicode (i.e. utf-8). In this case all characters of the input stream which are not part of the db character set are mapped to <b>one</b> special character code which you can't read. When you read the clob back you see some strange characters.
This is not the problem of writing/reading the clob but a problem with the db character set.
If you load data to the clob from a system using windows-1252 character set and this data contains some special characters like 'öäü', the db character set is set to utf-8, you should be able to read the clob data on a system using iso-8859-1 character set (or any other which have 'äöü') and see the special characters. That's the reason the reader/writer uses the system default character set.
If you see a different behavior, describe where you see the error or wrong characters.
Timo

Similar Messages

  • How to create AD contact object with multiple proxyAddresses?

    Hello,
    I need to create AD contact with multiple proxyAddresses to be used in mail routing.
    How can I accomplish this using Java?
    I can create an AD contact with single value fine. But I don't know how to populate a multivalue attribute.
    proxyAddresses: smtp:mytestuser@Domain1
    proxyAddresses: SMTP:mytestuser@Domain2
    Also, how do I update a multivalue attribute? When first name and/or last changes, the proxyAddresses will need to be updated?
    How can I do this?
    Thanks
    Khanh

    This error is no longer coming up, it is now saying that it has an unsupported class version error. I believe this may be because the class file and library files have been complied under different versions, is there a method to check this?

  • How to create a ActiveX Object with custom classes

    Hi
    I am trying to create a Active X object for some of the work I have done in Java to be used with VB, but I cannot get the Active X object to generate and it always come up with the following error:
    Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError: uk/co/agena/minerva/model/Model
    at java.lang.Class.getMethods0(Native Method)
    at java.lang.Class.getDeclaredMethods(Unknown Source)
    at java.beans.Introspector$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source)
    at java.beans.Introspector.getTargetEventInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at sun.beanbox.JarInfo.<init>(Unknown Source)
    at sun.beanbox.JarLoader.createJarInfo(Unknown Source)
    at sun.beanbox.JarLoader.loadJar(Unknown Source)
    at sun.beans.ole.Packager.loadBean(Unknown Source)
    at sun.beans.ole.Packager.generate(Unknown Source)
    at sun.beans.ole.Packager.actionPerformed(Unknown Source)
    at java.awt.Button.processActionEvent(Unknown Source)
    at java.awt.Button.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    This appears to be beacuse the class uk/co/agena/minerva/model/Model is a custom class which is based on the software I am using. Does anyone know how I can get around this issue. I have tried incluijng those class files for the custom classes within the jar file, but I continue to get the same issue?
    Any help would be gratefully received.
    Thanks
    Angie

    This error is no longer coming up, it is now saying that it has an unsupported class version error. I believe this may be because the class file and library files have been complied under different versions, is there a method to check this?

  • How to create the Frame object with API in 6i?

    do i create an item using d2fitmcr_Create, and then set the type or style to frame? or is it a graphics item that i have to create using a different function? ive tried various combinations with no luck.
    ive looked at the frame object in the GUI, and cant figure out how to duplicate it using the API (the frame object is the thin line box with a label used to groups items visually on a form)
    thanks!
    [email protected]

    Frame is a type of graphic d2fgracr_Create() (d2fgra.h) then set the type as required using d2fgras_graphics_typ():
    Definition of Graphics types is in d2fdef.h
    ** Graphics Type (D2FP_GRAPHICS_TYP)
    ** [BPT]
    #define D2FC_GRTY_ARC              0                                 /* Arc */
    #define D2FC_GRTY_IMAGE            1                               /* Image */
    #define D2FC_GRTY_LINE             2                                /* Line */
    #define D2FC_GRTY_POLY             3                             /* Polygon */
    #define D2FC_GRTY_RECT             4                           /* Rectangle */
    #define D2FC_GRTY_RREC             5                   /* Rounded Rectangle */
    #define D2FC_GRTY_TEXT             6                                /* Text */
    #define D2FC_GRTY_GROUP            7                               /* Group */
    #define D2FC_GRTY_FRAME            8                               /* Frame */All the various properties for setting up the associated block etc (if required) can be set through macros in d2fgra.h

  • How to create a Type Object with Dynamic select query columns in a Function

    Hi Every One,
    I'm trying to figure out how to write a piplined function that executes a dynamic select query and construct a Type Object in order to assigned it to the pipe row.
    I have tried by
    SELECT a.DB_QUERY INTO actual_query FROM mytable a WHERE a.country_code = 'US';
    c :=DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(c,actual_query,DBMS_SQL.NATIVE);
    l_status := DBMS_SQL.EXECUTE(c);
    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.DEFINE_COLUMN(c,j,v_val,2000);
    END LOOP;
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.COLUMN_VALUE(c,j,v_val);
    END LOOP;
    But got stuck, how to iterate the values and assign to a Type Object from the cursor. Can any one guide me how to do the process.
    Thanks,
    mallikj2

    Hi Justin,
    First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
    In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
    Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
    Thanks in Advance,
    mallikj2.

  • How to create a date object with a specific time?

    How can I create a date with today's date but with a specific time, say: 20:00:00?
    Thanks in advance.

    Don't forget about those pesky milliseconds!I'd have gotten away with it too.. if it hadn't been
    for that pesky BigDaddyLoveHandles.I'm in top form today. On the drive in to work I managed to
    push two scooter riders off the road and gave the finger to
    a Prius owner.

  • How to create a circle object with center(lat/long) and radius(kilo)?

    Hi
    I want to create a circle in my table, the data I have are the coordinate of center(lat/long) and the radius of the circle. The srid of the table is lat/long.
    Did I have to use some fomula to compute the coordinate of three points on the circle? If it's true, is there any example procedure you can show me?
    Thanks
    Lannie

    When a circle is created using SDO_BUFFER in geodetic space,
    the result is a circle with stroked arcs (as in arc_densify function).
    So the result from SDO_BUFFER will be a valid polygon without arcs,
    but approximate circle with straight lines.
    For example, in the example given by Dan, this is what you get:
    SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(-120, 42.09003, -120.03128, 42.086958, -120.06042, 42.0779524, -120.08543, 42.0636292, -120.1046, 42.0449675, -120.11663, 42.0232424, -120.1207, 41.9999365,
    -120.11654, 41.9766391, -120.10445, 41.9549369, -120.08526, 41.9363067, -120.06028, 41.9220148, -120.0312, 41.9130321, -120, 41.9099686, -119.9688, 41.9130321,
    -119.93972, 41.9220148, -119.91474, 41.9363067, -119.89555, 41.9549369, -119.88346, 41.9766391, -119.8793, 41.9999365, -119.88337, 42.0232424, -119.8954, 42.0449675, -119.91457, 42.0636292, -119.93958, 42.0779524, -119.96872, 42.086958, -120, 42.09003))
    siva

  • How to create a view object and attach with extended AM

    Hi,
    I tried to create new vo and attach this vo with the extended AM. But it is throwing error like 'PC.NAME : invalid identifier' (Actually this PC.NAME is exiting one).
    Now i want to know how to create a view object similar like seeded one but with one additional condition in the where clause.
    It is possible though extension, but i want to create two view object similar like seeded one, one with some other condition in the where clause
    and another one with some other condition.
    So for my requirement, i'll extend one VO and i'll add my condition but how to do it for second condition.
    But i want same seeded VO with two different condition.
    Any suggestions please,
    SAN

    SAN,
    There is no need to attach the newly created VO with extended AM. You need to attach the same with the standard AM.
    Regards,
    Gyan

  • Re: How to create More two class with one object

    haii,
             i have small information How to create More two class with one object,
    bye
    bye
    babu

    Hello
    I assume you want to create multiple instance of your class.
    Assuming that you class is NOT a singleton then simply repeat the CREATE OBJECT statement as many times as you need.
    TYPES: begin of ty_s_class.
    TYPES: instance   TYPE REF TO zcl_myclass.
    TYPES: end of ty_s_class.
    DATA:
      lt_itab      TYPE STANDARD TABLE OF ty_s_class
                     WITH DEFAULT KEY,
      ls_record  TYPE ty_s_class.
      DO 10 TIMES.
        CLEAR: ls_record-instance.
        CREATE OBJECT ls_record-instance.
        APPEND ls_record TO lt_itab.
      ENDDO.
    Regards
      Uwe

  • How to create a Java Object dynamically

    I want to convert a "DataObject (SDO) " into "Pure java object".
    For this i want to create a java object with the fields in Dataobject, and this should be in generic way.

    I want to convert a "DataObject (SDO) "What is a "DataObject (SDO)"?
    into "Pure
    java object".What is a "Pure java object"?
    For this i want to create a java object with the
    fields in Dataobject, What is stopping you? Do you not know how do define a class? Do you think you can add fields to the Object class? If that's what you mean, you're out of luck.
    and this should be in generic
    way.What do you mean "in generic way"? "Generic" is a very generic term. There are lots of contexts in which it could apply and lots of different possible meanings for "generic way."
    You'll have to explain your queston more clearly.

  • How to create a transport request with query and only with its structure.

    HI guru,
                how to create a transport request with query and only with its structure.transport request should not  include any other query items like ( variables, conditions...etc)
    thanks in advance.
    venkata

    Hi,
    Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
    Regards,
    anil

  • How to create a workflow dealing with customizing program(Add-on program)

    Dear ALL,
    I am new to workflow and I was assigned to create a workflow related to an customizing program(Dynpro screen).
    I know we can refer to some std. template for workflow developing.
    However, I don't know how to create a brand new workflow to deal with the add-on program and table.
    My major difficulty is how to create a new object:
    --How to create the new event to track the operation of add-on program, for example, push 'submit' button.
    --How to create method to update the add-on table.
    I do hope someone could give me some guidance.
    Thank,
    Gary

    This is a Function Module that triggers an event ob Business Object tht you will create by making a subtype of Business Object. Use Transaction Code SWO1 to do so.
    FUNCTION zwf_process_trip.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_EMP_NUMBER) TYPE  PERNR_D
    *"     VALUE(I_EMP_TRIP) TYPE  REINR
      INCLUDE <cntn01> .
      DATA:i_emp_details TYPE STANDARD TABLE OF p0001,  "Employee Details
           wa_request    TYPE p0001,                    "Workarea for Employee details
           v_country_grp TYPE molga,                    "Country SubGrouping
           v_object_key  TYPE sweinstcou-objkey.        "Key for the buisness object ZWOBUSTRIP
      CONSTANTS: c_bo_trip     TYPE swo_objtyp VALUE 'ZWOBUSTRIP',
                 c_event_trip  TYPE swo_event  VALUE 'TripCreate',
                 c_infy_type_1 TYPE infty      VALUE '0001'.
    Event Container declaration
      swc_container i_event_cont.
      swc_create_container i_event_cont.
    Reading the INFO TYPE 0001 to obtain the
    Employee details
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr           = i_emp_number
          infty           = c_infy_type_1
          begda           = sy-datum
          endda           = sy-datum
        TABLES
          infty_tab       = i_emp_details
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
    SY-SUBRC check is not required as the error
    handelling will be done by WorkFlow rule
    resolution.
      CLEAR wa_request.
      READ TABLE i_emp_details INTO wa_request INDEX 1.
      IF sy-subrc = 0.
      Retrieving the Country SubGrouping for the employee
        SELECT SINGLE molga
          FROM t001p
          INTO v_country_grp
         WHERE werks = wa_request-werks
           AND btrtl = wa_request-persk.
      ENDIF.
    Sending the relevant data to event container
      swc_set_element i_event_cont 'EmpId'     i_emp_number.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'PersonnelArea'    wa_request-werks.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'CountryGrouping' v_country_grp.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'EmpSubGrp'       wa_request-persk.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'EmpTripId'       i_emp_trip.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
    Raising the event to trigger the workflow
      v_object_key = i_emp_number.
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype           = c_bo_trip
          objkey            = v_object_key
          event             = c_event_trip
        TABLES
          event_container   = i_event_cont
        EXCEPTIONS
          objtype_not_found = 1
          OTHERS            = 2.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      COMMIT WORK.
    ENDFUNCTION.
    SWEL Transaction Code is used to track event linkage.
    SWUS is used to test Workflow manually with single test.
    <b>Please reward points if useful</b>
    Thanks
    Arghadip

  • How to create authority check object and assign to  ztcode which is of modu

    Dear ,
             how to create authority check object and assign to  ztcode which is of custom module pool program.its urgent kindly help points rewarded.

    Manoj,
    You can check with your Basis team to create authorisation object and assigining tcodes to the user profiles.
    K.Kiran.

  • How to create new authorisation object for Transactions?

    Hi,
    How to create new authorisaton object and how to assign that object on a transaction code?
    Case ->
    The transaction code VL01N have the object called V_LIKP_VST under Class "LE_V" that have two auth. fields. one is 'Activity' and other one is "Shipping Point/Receiving Point".
    Here I want to add "Storage location" also. I have created one object called "Z_LIKP_VST" under same calass "LE_V". and added "Activity", "Shipping Poing/Receiving Poing" and "Storage Location". After that I added that object ("Z_LIKP_VST") for particular transaction through "SU24". I maintained the "Display check indicator" for VL01N.
    I created one new role and assigend the particular transacation for a user. but still SAP taking  V_LIKP_VST insted of Z_LIKP_VST.
    How can I change my Z_LIKP_VST on profile.
    Please help
    Thanks in Advance
    Lal

    Hi Kariyath,
    I suppose its not about interest but a MUST.. sorry but.. unless u include the Logic in the program how can SAP pick these custom Z objects ?
    after u create them and assign to a Tcode in SU24 there is no logic to check these objects. Frankly i see no other chance.... unless SAP comes to us with a great easy way to input these Custom objects
    Keep looking and please Update me if u have any Inputs....on this front..
    All the Best
    Br,
    Sri
    Award points for helpful answers

  • Plz tell me how to create authority check objects and how to usein prg

    dear sir,
    plz tell me how to create authority check objects and how to usein prg

    http://help.sap.com/saphelp_46c/helpdata/en/5c/deaa74d3d411d3970a0000e82de14a/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/52/6716a6439b11d1896f0000e8322d00/content.ht
    Create custom authorization – Customer specific object
    If you have requirements that cannot be met using the P_ORGIN and P_ORGXX authorization objects (for example, because you want to build your authorization checks on additional fields of the Organizational Assignment infotype (0001) that are customer-specific), you can include an authorization object in the authorization checks yourself.
    Create the authorization object using transaction SU21. Make sure you keep to the customer name range (Z/Y). To be able to use the new authorization object you have created in the master data authorization check, the object must contain the INFTY, SUBTY, and AUTHC fields. You can use any of the fields of the Organizational Assignment infotype (0001) for the other fields. You can also use customer-specific additional fields provided they are CHAR or NUMC type fields.
    After you have created the object, you must start the RPUACG00 report. This report overwrites the MPPAUTZZ standard include with the code that is needed to evaluate the authorization object you created. Note: Technically speaking, this involves a modification. However, SAP fully supports this procedure. And you should not have more maintenance work as a result of this modification.
              Note: that if you use customer-specific authorization objects, you must maintain these objects in transaction SU24 (Maintain Assignment of Authorization Objects to Transactions) in the same way as you maintain the authorization objects P_ORGIN, P_ORGXX, and P_PERNR
    AUTHORITY CHECK OBJECT Object_name
                ID fieldname1 FIELD fieldvalue1
                ID fieldname2 FIELD fieldvalue2
                ID fieldname3 FIELD fieldvalue3.
                 If sy-subrc eq 0.   "Authorization exists
                 Endif.
    http://articles.techrepublic.com.com/5100-6329_11-5110893.html
    Edited by: JackandJay on Jan 16, 2008 10:21 AM

Maybe you are looking for

  • Cannot burn a playlist to a CD

    I am using Snow Leopard, and I have the latest version of iTunes. I have created a playlist of items I have transferred from cassette tapes to iTunes. In Edit I selected Burn Playlist to Disc. At the message "Insert blank disc" I insert a blank. The

  • Non-Nokia headphones not working with N9

    Heyo, I tried plugging my Etymotic mc3 headphones into my N9, but the sound keeps playing through the speakers. The stock Nokia 'buds work, and the only difference between the two is that the Etymotics have inline volume controls. Will these buds sim

  • Duplicate e-Mail Since Upgraded to 3.0

    I am receiving duplicate e-mails on my iPhone since the upgrade to 3.0 when retrieving over the air or from wi-fi. I have an original iPhone (2G) with 16g. I have 3 e-mail accounts, 2 are from gmail (both giving me duplicates) and 1 from ATT (no dupl

  • Gaming and Flash Player 12

         Why is it in some game if I am in full screen and I try to type in a chat box my game will go to a smaller screen? I did not have this issue with earlier flashplayers.

  • Importing video into Flash MX2004

    Hi I've not worked with video before, but now have a requirement to use a video clip in a Flash movie. I have found a royalty free movie clip which is perfect, but would need to work over the top of this file to add some bits to the movie. My questio