Call function from data base with clob input parameter.

Hello,
In this project I use Jdev 11g.
I call function from database.
create or replace function get_fa_list (
p_fa_id_list in clob
return sys_refcursor
is
vCursor sys_refcursor;
begin
put_msg ('begin');
if p_fa_id_list is null then
put_msg ('CLOB is null!');
else
put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
end if;
put_msg ('Save');
open vCursor for
select rownum as id, s.*
from (
select f.latitude, f.longitude, count (distinct f.res_id) as res_count, count (*) as fa_count, 16711680 as color, res_concat_distinct (f.res_id) as station_list
from mv_frequency_assignment f, table (SplitClob (p_fa_id_list, ',')) l
where f.ext_system = 'BI' and
f.ext_sys_id = l.column_value
group by f.latitude, f.longitude
) s;
put_msg ('Open and End');
return vCursor;
end get_fa_list;
I use TopLink in ejb.
i use follow code for call function and get result.
public List<TmpResPoints> findAllPointsBI(String p_id){
UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
uow.beginEarlyTransaction();
StoredFunctionCall call = new StoredFunctionCall();
call.setProcedureName("get_fa_list");
call.useUnnamedCursorOutputAsResultSet();
ClobDomain c = new ClobDomain(p_id);
//System.out.println(c.toString());
call.addNamedArgumentValue("p_fa_id_list", c);
ReadAllQuery query = new ReadAllQuery();
query.setReferenceClass(TmpResPoints.class);
query.setCall(call);
List<TmpResPoints> result = (List<TmpResPoints>)uow.executeQuery(query);
uow.commit();
uow.release();
return result;
But size parameter "p_fa_id_list" is 0. (geting from temp table in Data base). this code in function >>
if p_fa_id_list is null then
put_msg ('CLOB is null!');
else
put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
end if;)
How I can call this function from dataBase and get result?
thx,
Demka.

What is the SQL generated?
The argument should just be the Clob value (a String) not the domain object.
Also try addNamedArgument, and then pass the named argument to the query.
James : http://www.eclipselink.org

Similar Messages

  • Calling PLSQL Procedure with CLOB input parameter from JDBC

    Hi..
    I've got a PLSQL procedure with a CLOB object as input parameter:
    function saveProject (xmldoc CLOB) RETURN varchar IS
    I want to call that procedure from my JDBC Application as...
    String data = "..."
    CallableStatement proc = conn.prepareCall
              ("begin ? := saveProject (?); end;");
    neither
    proc.setCharacterStream(2, new StringReader(data, data.length());
    nor
    proc.setString(2, data);
    will work.
    The Application throws java.sql.Exception: ... PLS-00306 wrong
    number or types of arguments in call 'SAVEPROJECT'
    How can I use set setClob method?
    The Problem is: with Oracles CLOB implementation I can't create
    an Instance, and from the CallableStatement a can't get a
    Locator for a CLOB-Object.
    This CLOB stuff makes me really nuts!
    please somebody help me.. thanks
    Alex

    Hi All,
    You can not make it like that.
    You can not make clob as input parameter.
    Do you want an easy way?
    This is the easy way.
    sample:
    function myFunction(S varchar2(40))
    return integer as
    begin
    insert into TableAAA values(S)
    --TableAAA only contains 1 column of clob type
    end;
    This will work the problem with this is the parameter is in
    varchar2 right? so there will be limited length for it.
    You can do this to call that function:
    nyFunction('My String that will be input into clob field');
    There's another slight difficult way, I understand that you have
    installed Oracle client/server in your system, try to look at
    jdbc folder and try to find demo.zip in that folder, you can
    find several ways of doing thing with jdbc.
    Have a nice day,
    Evan

  • Call a storedprocedure with CLOB input parameter gives ORA-24811 error

    Hi all,
         I am calling a storedprocedure from VB using ADO and OraOLEDB. Calling stored procedure as mention in OraOLED documentation.
         The procedure accepts a varchar and a CLOB parameter.
         While executing the store procedure its throw an error as “Error while trying to retrieve text for error ORA-24811”
         Then I executed a storeprocedure with only one CLOB out parameter. It is working fine.
         Oracle version is
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    PL/SQL Release 9.2.0.4.0 - Production
    CORE 9.2.0.3.0 Production
    TNS for Linux IA64: Version 9.2.0.4.0 - Production
    NLSRTL Version 9.2.0.4.0 - Production
         O/S: Linux.
         OLEDB version 9.0.1.0.1
         But exact code working with
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE 9.2.0.1.0 Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 – Production
    O/S window 2003
    OLEDB version 9.0.1.0.1
    Can somebody help me on this?
    Regards,
    Mani
    Sample code of stored of stored procedure and VB function pasted below.
    StoreProcedure
    ============
    create or replace procedure xmltext (EmpName varchar2,EmpDetails CLOB)
    as
    begin
    insert into emptmp values (EmpName);
    end;
    VB function
    =========
    Dim Oracon As New ADODB.Connection
    Dim cmd As New ADODB.Command
    Dim param1 As New ADODB.Parameter
    Dim param2 As New ADODB.Parameter
    Dim empname As String
    Dim empdetails As String
    Set Oracon = CreateObject("ADODB.Connection")
    Oracon.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=testdb;User ID=newtest;Password= newtest;PLSQLRSet=1;SPPrmsLOB=1"
    Oracon.Open
    empname = "Mani"
    empdetails = "<EmpDet/>"
    Set cmd.ActiveConnection = Oracon
    cmd.CommandType = adCmdText
    Set param1 = cmd.CreateParameter("param1", adVarChar, adParamOutput, 10, empname)
    cmd.Parameters.Append param1
    Set param2 = cmd.CreateParameter("param2", adLongVarChar, adParamInput, 10000, empdetails)
    cmd.Parameters.Append param2
    cmd.CommandText = "{ call xmlText(?,?)}"
    cmd.Execute

    code for my procedure testblob is :
    create or replace procedure testblob(bpic blob) as
         val               blob;
         v_rdata          blob;
         v_start          BINARY_INTEGER := 1;
         v_buffer     BINARY_INTEGER := 32767;
    BEGIN
    select pic into val from my_pic where no=1 for update;
    DBMS_LOB.OPEN (val, DBMS_LOB.LOB_READWRITE);
    FOR i IN 1..CEIL(DBMS_LOB.GETLENGTH(bpic) / v_buffer)
         LOOP
         v_rdata :=DBMS_LOB.SUBSTR(bpic, v_buffer, v_start) ;
         DBMS_LOB.WRITEAPPEND(val, DBMS_LOB.GETLENGTH(v_rdata), v_rdata);
         v_start := v_start + v_buffer;
         END LOOP;
    dbms_lob.close(val);
    exception
         when others then
              raise_application_error(-20000,sqlerrm);     
    end;

  • Web service data control with complex input parameter problem

    Hi!
    I'm making ADF web app, using JDev 11.1.1.2.0. I have to call a web service (using a data control), which has complex input parameter (array of complex objects).
    I followed steps from Susan Duncan blog: http://susanduncan.blogspot.com/2006/09/dealing-with-complex-input-params-in.html , but I ran into a problem.
    As Susan wrote, I changed submit's button action binding to an operation in a managed bean, which returns array of objects and everything works fine. I can call a WS and my table shows the result.
    The problem is, that after I change button's action binding to my manage bean, row selection in result table doesn't work anymore (I allways get NullPointerException).
    What can be done here?
    Can somebody please help?

    Hi,
    I also have similar type of problem where I need to invoke a Web service with Complex input parameters.
    I followed Susan's blog but I stuck at a point where methos getItem is created.
    Can anyone tell me how to get that method for my requirement.
    If possible can you guys share your solutions here.
    Thanks in advance.

  • Calling report from a form with user input parameters

    Hello,
    I am new to Oracle reports. I have an application coded in 6i. I am currently running the application in Oracle Forms Builder 9i. There are also few reports which are called from the forms. Since the application was developed in 6i, the report was called using Run_Product. The forms pass a set of user parameters to the report using the parameter list pl_id. The syntax used was Run_Product(REPORTS, 'D:\Report\sales.rdf', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
    I learnt that the Run_product doesnt work in 9i and we need to use run_report_object. I have changed the code to use run_report_object and using web.show_document () i am able to run the report from the form. There are 2 parameters that need to be passed from forms to reports. The parameters are from_date and to_date which the user will be prompted to enter on running the form. In the report, the initial values for these parametes are defined. So, the report runs fine for the initial value always. But when i try to change the user inputs for the form_date and to_date, the report output doesnt seem to take the new values, instead the old report with the initial values(defined in the report) runs again.
    Can someone give me the code to pass the user defined parameters to the report from the forms? I have defined a report object in the forms node as REPTEST and defined a parameter list pl_id and added form_date and to_date to pl_id and used the following coding:
    vrepid := FIND_REPORT_OBJECT ('REPTEST');
    vrep := RUN_REPORT_OBJECT (vrepid,pl_id);
    But this doesnt work.
    Also, Should the parameters defined in the forms and reports have the same name?

    Thanks for the quick response Denis.
    I had referred to the document link before and tried using the RUN_REPORT_OBJECT_PROC procedure and ENCODE functions as given in the doc and added the following SET_REPORT_OBJECT_PROPERTY in the RUN_REPORT_OBJECT_PROC :
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    But this also dint work. Please help me understand what difference does setting paramform=no OR paramform=yes make?
    In the report, i have defined the user parameters as FROM_DATE and TO_DATE respectively so that they match the form datablock BLK_INPUT items FROM_DATE and TO_DATE.
    My WHEN_BUTTON_PRESSED trigger is as below:
    DECLARE
    report_id report_object;
    vrep VARCHAR2 (100);
    v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
    v_connect VARCHAR2 (30) := '&userid=scott/tiger@oracle';
    v_report_server VARCHAR2 (30) := 'repserver90';
    BEGIN
    report_id:= find_report_object('REPTEST');
    -- Call the generic PL/SQL procedure to run the Reports
    RUN_REPORT_OBJECT_PROC( report_id,'repserver90','PDF',CACHE,'D:\Report\sales.rdf','paramform=no','/reports/rwservlet');
    END;
    ... and the SET_REPORT_OBJECT_PROPERTY code in the RUN_REPORT_OBJECT_PROC procedure is as:
    PROCEDURE RUN_REPORT_OBJECT_PROC(
    report_id REPORT_OBJECT,
    report_server_name VARCHAR2,
    report_format VARCHAR2,
    report_destype_name NUMBER,
    report_file_name VARCHAR2,
    report_otherparam VARCHAR2,
    reports_servlet VARCHAR2) IS
    report_message VARCHAR2(100) :='';
    rep_status VARCHAR2(100) :='';
    vjob_id VARCHAR2(4000) :='';
    hidden_action VARCHAR2(2000) :='';
    v_report_other VARCHAR2(4000) :='';
    i number (5);
    c char;
    c_old char;
    c_new char;
    BEGIN
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,report_file_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,report_server_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,report_destype_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,report_format);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);
    hidden_action := hidden_action||'&destype='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);
    hidden_action := hidden_action||'&desformat='||GET_REPORT_OBJECT_PROPERTY (report_id,REPORT_DESFORMAT);
    hidden_action := hidden_action ||'&userid='||get_application_property(username)||'/'||get_application_property(password)||'@'||get_application_property(connect_string);
    c_old :='@';
    FOR i IN 1..LENGTH(report_otherparam) LOOP
    c_new:= substr(report_otherparam,i,1);
    IF (c_new =' ') THEN
    c:='&';
    ELSE
    c:= c_new;
    END IF;
    -- eliminate multiple blanks
    IF (c_old =' ' and c_new = ' ') THEN
    null;
    ELSE
    v_report_other := v_report_other||c;
    END IF;
    c_old := c_new;
    END LOOP;
    hidden_action := hidden_action ||'&'|| v_report_other;
    hidden_action := reports_servlet||'?_hidden_server='||report_server_name|| encode(hidden_action);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||report_otherparam);
    -- run Reports
    report_message := run_report_object(report_id);
    rep_status := report_object_status(report_message);
    IF rep_status='FINISHED' THEN
    vjob_id :=substr(report_message,length(report_server_name)+2,length(report_message));
    message('job id is'||vjob_id);pause;
    WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
    ELSE
    --handle errors
    null;
    END IF;
    In the code - " hidden_action := hidden_action ||'&'|| v_report_other; " in the RUN_REPORT_OBJECT_PROC procedure above, how do i make sure that the v_report_other variable reflects the user input parameters FROM_DATE and TO_DATE ??? v_report_other is initialised as v_report_other VARCHAR2(4000) :=''; in the procedure. Will ensuring that the v_report_other contains the user input parameters FROM_DATE and TO_DATE ensure that my report will run fine for the input parameters?
    Thanks in advance.
    Edited by: user10713842 on Apr 7, 2009 6:05 AM

  • Problem in selection from data base with RANGE-TABLE.

    Dear folks,
                   I am facing weird problem with range table in selection query.I have problem with bold part of code.Here when i give input to both ranges r_salesno,r_brandid then and the selection occurs ,when i put black in one of those it does not work.I haev passed Empty table to range if no inpiut in elements..although it does not work..I dont know why it is happening...By the i m using this code in Webdynpro ABAP.Please help points will be awarded..
    if  Stru_Cn_Selcrtr-ca_slsrl is not initial.
        wa_salesno-sign = 'I'.
        wa_salesno-option = 'EQ'.
        wa_salesno-LOW = Stru_Cn_Selcrtr-ca_slsrl.
        APPEND wa_salesno TO r_salesno.
        CLEAR : wa_salesno .
      else.
        wa_salesno-sign = 'I'.
        wa_salesno-option = 'EQ'.
        wa_salesno-LOW = space.
        APPEND wa_salesno TO r_salesno.
         CLEAR : wa_salesno .
      endif.
      if  Stru_Cn_Selcrtr-ca_brand is not initial.
        wa_brandid-sign = 'I'.
        wa_brandid-option = 'EQ'.
        wa_brandid-LOW = Stru_Cn_Selcrtr-ca_brand.
        APPEND  wa_brandid TO  r_brandid.
        CLEAR :  wa_brandid .
      else.
        wa_brandid-sign = 'I'.
        wa_brandid-option = 'EQ'.
         wa_brandid-LOW = space.
        APPEND wa_brandid  TO  r_brandid.
        CLEAR : wa_brandid  .
      endif.
    *If any of these are given then select data accordingly.
        <b>select * from ZNSLVWHDIMMD_LCL
                 into corresponding fields of table IT_VIEW
                 WHERE SALESRLNO in  r_salesno
    *             and   CREATEDBY in It_crtby_selopt
    *            and   STARTDATE in It_validfrm_selopt
    *             and   ENDDATE   in It_validto_selopt
    *             and  STATUS     in It_status_selopt1
                 and   BRANDID   in r_brandid.
    *             and   MODELNO   in It_model_selopt.</b>

    Hello Nirad
    Your coding is problematic. I assume that field SALESRLNO (of table ZNSLVWHDIMMD_LCL) probably means sales number (or sales order) and, thus, must not be empty. If this is correct then the first IF statement is probably wrong:
    if  Stru_Cn_Selcrtr-ca_slsrl is not initial.
        wa_salesno-sign = 'I'.
        wa_salesno-option = 'EQ'.
        wa_salesno-LOW = Stru_Cn_Selcrtr-ca_slsrl.
        APPEND wa_salesno TO r_salesno.
        CLEAR : wa_salesno .
      else.
        REFRESH: r_salesno.  " means: select all sales numbers
    " NOTE: If you fill the range like below this means that only sales order
    "            with no sales number (= ' ', space) should be select.
    " Thus, there will never be any sales order selected.
    *   wa_salesno-sign = 'I'.
    *   wa_salesno-option = 'EQ'.
    *   wa_salesno-LOW = space.
    *   APPEND wa_salesno TO r_salesno.
    *    CLEAR : wa_salesno .
      endif.
    The same logic applies to the second IF statement. If you want to select all BRANDID if none has been provided as selection criteria then code:
      if  Stru_Cn_Selcrtr-ca_brand is not initial.
        wa_brandid-sign = 'I'.
        wa_brandid-option = 'EQ'.
        wa_brandid-LOW = Stru_Cn_Selcrtr-ca_brand.
        APPEND  wa_brandid TO  r_brandid.
        CLEAR :  wa_brandid .
      else.
        REFRESH: r_brandid.  " means: select all BRANDID
    *    wa_brandid-sign = 'I'.
    *    wa_brandid-option = 'EQ'.
    *     wa_brandid-LOW = space.
    *    APPEND wa_brandid  TO  r_brandid.
    *    CLEAR : wa_brandid  .
      endif.
    Regards
      Uwe

  • Send data to ECC table through RFC Call function from SAP B1 via  b1if

    Hi,
    I have created scenario in B1if which triggers from SAP B1, now I have to send this data in to ECC table, so I have created scenario for that with inbound SAP B1, outbound void and in process RFC Call atom is there but I am not getting data in receiver and also how to write xml to send data in RFC function. Function for RFC has configured from ECC end and have access of that function.
    So please help me to send data to ECC table through RFC Call function from SAP B1 (9.0) via b1if
    Thanks

    Solved by my own.

  • How to Call Function from SAPSCRIPT

    I want to Call a function from my SAPSCRIPT to get some data and print the same in the form , Can I get an example for this

    Hi Nandan,
    U cannot directly call function from SAPScript... For that u have to create one include in which u need to write the code. Using Perform... EndPerform u can call the same from SAPScript. See the below example
    u need to write this code in SAPScript
    PERFORM formname IN PROGRAM includename
    USING &field1&                                      
    USING &field2&                                      
    CHANGING &field3&                                     
    ENDPERFORM                                               
    Here includename is your include type program.
    u need to write this code in your include type program..
    FORM formname TABLES in_par STRUCTURE itcsy
                            out_par STRUCTURE itcsy.
    data : var1 like field1,
           var2 like field2,
           var3 like field3.
      READ TABLE in_par WITH KEY 'field1'.
      CHECK sy-subrc = 0.
      var1 = in_par-value.
      READ TABLE in_par WITH KEY 'field2'.
      CHECK sy-subrc = 0.
      var2 = in_par-value.
    now u can call corresponding function using local VAR1 and VAR2. Here u can pass N no of USING parameters.
    After processing on VAR3...
      READ TABLE out_par WITH KEY 'field3'.
      out_par-value = VAR3.
      MODIFY out_par INDEX sy-tabix.
    EndForm.
    Here in_par and out_par are the structures which will be used to communicate with SAPScript. And this is the only way as per my view.
    I m sure this code will work fine. Here i have used dummy variables that u need to change as per your requirement. If u have more queries write me back.
    And yes if this works than dont forget to give the points.
    Regards,
    Sagar

  • How can we make a call to the Data base in the SAP Scripts?

    Hi All,
            How we make a call to the data base in scripts?
    I think we can use the PERFORM statement to achieve the above functionality.
    Pls correct me if i am wrong?
    Regards
    Abhilash.

    Hello.
    If you want to access database in the script itself (not in print program) yes, you can use PERFORM statement.
    In your script, use:
    /: PERFORM F_FORM IN PROGRAM ZRFIRFS05
    /: USING &VAR1&
    /: CHANGING &VAR2&
    /: ENDPERFORM
    Then, create a program ZPROG (ZRFIRFS05 in my case) with a structure like this one:
    REPORT ZRFIRFS05 .
    FORM f_form TABLES in_par STRUCTURE itcsy out_par STRUCTURE itcsy.
      DATA: l_data1(10).
      READ TABLE in_par WITH KEY name = 'VAR1'.
      CHECK sy-subrc = 0.
      l_data1 = in_par-value.
    *  SELECT .... "YOUR SELECT TO DATABASE
      READ TABLE out_par WITH KEY name = 'VAR2'.
      CHECK sy-subrc = 0.
      out_par-value = l_data3.
      MODIFY out_par INDEX sy-tabix.
    ENDFORM.
    Regards.
    Valter Oliveira.

  • When to refresh Servlet data from Data Base

    Hello all,
    I have a servlet that retrive few hundreds thousands records from data base table.
    The data in data base table being updated once or twice in every week.
    Since same servlet instance serve all users, that access the servlet many times a day.
    I would like to avoid retriving the data from data base on each servlet access.
    and make the users use same data already retrieved and kept in servlet members.
    First, what is the best way to avoid data retrive from data base on each servlet access?
    and how could I have some kind of trigger that will refresh servlet data from data base every few days?
    Thanks in advance for every idea.
    Ami

    Java_A wrote:
    Thanks Saish for your reply.
    I'm not using DAO in my application but retrive the data from BI data base using a web service. response time querying the BI data base is not quick enuogh.
    Since, I wouldn't want to query the BI server on each servlet access.
    Because the data I retrived at the begining using the web service contains all required data for all servlet requests, I thought to store the data (~200K rows) once in the servlet which will be using for all requests.
    Why not store the results locally in your own database after you fetch them?
    This still leave me with the questions: in which event should I query the BI data, and also when or in which event should I update the data again from BI server?
    Query at startup, an user demand, when data becomes stale. It depends on your requirements.
    >
    Thanks
    Ami- Saish

  • Howto call custom Oracel Data Type with TopLink?

    Hello,
    in our DB we have a custom Oracle type and a PL/SQL method which uses it.
    I would like to call the Oracle data type with TopLink. How can I do this?
    I could not find any documentation on this.
    I know JPublisher can do this but I don't want to use it!
    Please see code below
    cheers,
    Pete
    **************Datatype********************************
    CREATE TYPE My_Sub_Object AS OBJECT (Sub_Object_ID Number,
    Sub_Object_Txt VARCHAR2(200));
    CREATE TYPE My_Sub_Objects AS VARRAY (20) OF My_Sub_Object;
    CREATE TYPE My_object AS OBJECT (Object_id Number,
    Object_txt VARCHAR2(200),
    Sub_Objects My_Sub_Objects);
    ************PL/SQL-Method*****************************
    CREATE OR REPLACE PROCEDURE My_object_pro
    (Item_Object out My_Object) is
    Item_Sub_Object My_Sub_Object;
    Item_Sub_Objects My_Sub_Objects;
    Begin
    Item_Sub_Object := My_Sub_Object(10, 'Sub Object 10');
    Item_Sub_Objects := My_Sub_Objects(Item_Sub_Object);
    Item_Sub_Objects.Extend;
    Item_Sub_Object := My_Sub_Object(11, 'Sub Object 11');
    Item_Sub_Objects(2) := Item_Sub_Object;
    Item_Object := My_Object(1, 'Object', Item_Sub_Objects);
    End;
    /

    Object types and Varrays can be used from TopLink stored procedure calls. There was some support for this in 10.1.3, but the support in 11g (preview) is much better. You can also access the JDBC connection from TopLink or your DataSource and use JDBC directly.
    In TopLink 11g you can use an ObjectRelationalDescriptor to map the Object type to a Java class, and use this class as the argument type in your StoredProcedureCall.
    PL/SQL types are more difficult as they are not supported by JDBC, but your example only includes object types. If you had PL/SQL types you would need to wrap the types in object types, or use a PL/SQL block to convert them. TopLink 11g (preview 3) should have support for these as well.

  • Util class to extract Data from Data base Table.

    Is there any Util class to extract all records from Data base table into DAT file.For example(get all amployees from EMPLOYEE table in to employee.DAT )

    What is a DAT file?
    Anyway, this can be achieved using a shot of JDBC [1] and some business logic [2] to populate/group/concat the data together in a DAT format and writing [3] it to that DAT file.
    [1] JDBC tutorial: http://www.google.com/search?q=jdbc+tutorial+site:sun.com
    [2] Use your brains and things you ever learnt in maths and basic Java tutorials/books.
    [3] I/O tutorial: http://www.google.com/search?q=io+tutorial+site:sun.com

  • Creating a job for a procedure with an input parameter

    Hi,
    I want to create a job for a procedure ( sp_proc ) with a input parameter.
    The input parameter is a date value.
    As per the syntax for dbms_job.submit procedure;
    dbms_job.submit (
    job IN BINARY_INTEGER,
    what IN VARCHAR2,
    next_date IN DATE,
    interval IN VARCHAR2 DEFAULT 'NULL',
    no_parse IN BOOLEAN DEFAULT FALSE);
    How should the procedure be declared in the 'what' parameter of the dbms_job.submit procedure ?
    Please guide.
    Thanks.

    Hi,
    You are wright, I have found this thread [DBMS_JOB -- how to pass parameters to the job|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:351033761220].
    Regards,

  • How to display and edit the clob datatype column from Data base

    Hi ,
    I have a requiremsnt as below
    1) One Table having some columns with CLOB data type along with varchar columns
    2) need to display the data from DB in search screen and need to be edited clob column in edit screen
    I created EO and VO with that Table and how to display the clob value into the input box for editing.
    using Jdev 11.1.1.5.0 version.
    Can you please help on this.
    THanks & REgards,
    Madhu

    Hi,
    If you are using an inputText component to display a Character Large Object (CLOB), then you will need to create a custom converter that converts the CLOB to a String.
    For custom convertor refer below link,
    http://docs.oracle.com/cd/E2438201/web.1112/e16181/af_validate.htm#BABGIEDH
    (section7.4 Creating Custom JSF Converters)
    Thanks,
    Santosh M E

  • Call multiple functions from same dll with call library function

    hi,
    i am working on a project in wich we need to make a UI to read out a sensor network.
    the UI should be usable in any project, but every node needs a different piece of code depending on the type of sensor with wich it is equipt.
    so i need to be able to call different pieces of code when i need them, and still be able to use the UI in future projects with possibly new types of node we now don't have.
    so someone told me to use DLL's, cause then i would be able to call the code i need the moment i need it.
    but i have never worked with DLL's (just learned about this option 3 day's ago) so i have a question.
    i know i can dynamicly change the DLL i call with the call library function, but can i dynamicly change the function i call from that DLL ?
    or do i have to put a new call library function for each function i want to call, even if its from the same DLL ?
    kind regards,
    stijn

    nazarim wrote:
    ok so there is no (easy and ubderstandable) way for me to dynamicly change wich function i want to call from a certain DLL.
    but now i started wondering, the path on the call library function is not ment to dynamicly change a DLL
    but it does work so, if i am carefull, can i use it for that purpose or will labview give me a series of problems once i start using it in larger programs ?
    Thepath on the Call Library Node can be used to load a different DLL. Obviously since you can't change the function name your other DLL would have to export exactly the same function name and of course with the same parameters. This is seldom the case so it is not the main use of the path input to the Call Library Node. It's main use is as indicated to load DLLs at runtime rather than at load time of a VI. So that an application can run even when the DLL is missing, until the moment the functionality from that DLL is needed.
    If you can make sure that all your DLLs export the same function name with the same parameter you can use the Call Library Node to call into different DLLs through the path input. If however you would need to call different function names you would have to resolve to some DLL which does do the dispatching and invocation using LoadLibrary() and GetProcAddress(). But unless you need to go with DLLs for some reason using the Call By Reference Node can give you an even more flexible approach. 
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for