Creating parameters dynamically and calling a procedure but strange issue

Okay I have the following program that is calling a procedure(data_compare_utility)[pasted below] and data_compare_table_setup table definition and data(isert scripts) are pasted below :
DECLARE
--FP_OLD_TABLE VARCHAR2(200);
--FP_NEW_TABLE VARCHAR2(200);
--FP_DATA_COMPARE_ID NUMBER(10) := 1;
--FP_RESTRICTION_CLAUSE VARCHAR2(500) := 'WHERE W_INSERT_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'') OR W_UPDATE_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'')';
--FP_RESTRICTION_CLAUSE_4_INS VARCHAR2(500) := 'WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')';
cursor c_data_compare_table_setup
is
select table_name, old_schema_name, new_schema_name, data_compare_id, restriction_clause, restriction_clause_ins from DATA_COMPARE_TABLE_SETUP;
r_of_data_compare_table_setup c_data_compare_table_setup%rowtype;
Lv_args_4_data_compare_utility varchar2(500);
BEGIN
--FP_OLD_TABLE := 'BIAPPS_11.RAHUL_EMPLOYEES';
--FP_NEW_TABLE := 'RAHULKALRA.RAHUL_EMPLOYEES';
open c_data_compare_table_setup;
Loop
fetch c_data_compare_table_setup into r_of_data_compare_table_setup;
exit when c_data_compare_table_setup%NOTFOUND;
--exec RAHULKALRA.P_COMPARE_DATA_UTILITY
Lv_args_4_data_compare_utility := ''''||r_of_data_compare_table_setup.OLD_SCHEMA_NAME||'.'||r_of_data_compare_table_setup.TABLE_NAME||''','''||r_of_data_compare_table_setup.NEW_SCHEMA_NAME||'.'||r_of_data_compare_table_setup.TABLE_NAME||''','||r_of_data_compare_table_setup.DATA_COMPARE_ID||','''||r_of_data_compare_table_setup.RESTRICTION_CLAUSE||''','''||r_of_data_compare_table_setup.RESTRICTION_CLAUSE_INS||'''';
P_COMPARE_DATA_UTILITY(Lv_args_4_data_compare_utility);
commit;
End Loop;
dbms_output.put_line('rahul');
dbms_output.put_line(''''||r_of_data_compare_table_setup.OLD_SCHEMA_NAME||'.'||r_of_data_compare_table_setup.TABLE_NAME||''','''||r_of_data_compare_table_setup.NEW_SCHEMA_NAME||'.'||r_of_data_compare_table_setup.TABLE_NAME||''','||r_of_data_compare_table_setup.DATA_COMPARE_ID||','''||r_of_data_compare_table_setup.RESTRICTION_CLAUSE||''','''||r_of_data_compare_table_setup.RESTRICTION_CLAUSE_INS||'''');
--P_COMPARE_DATA_UTILITY('BIAPPS_11.RAHUL_EMPLOYEES','RAHULKALRA.RAHUL_EMPLOYEES',1,'WHERE W_INSERT_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'') OR W_UPDATE_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'')','WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')');
--P_COMPARE_DATA_UTILITY('BIAPPS_11.RAHUL_EMPLOYEES','RAHULKALRA.RAHUL_EMPLOYEES',1,'WHERE W_INSERT_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'') OR W_UPDATE_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'')','WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')');
close c_data_compare_table_setup;
END;
Procedure : compare_data_utility:
CREATE OR REPLACE procedure RAHULKALRA.p_compare_data_utility(fp1_old_table in varchar2, fp2_new_table in varchar2, fp3_data_compare_id in number, fp4_restriction_clause in varchar2, fp5_recrtiction_clause_4_ins in varchar2)
as
Lv_common_column_names varchar2(2000);
Lv_primary_column_name varchar2(50);
Lv_insert_data_compare_log varchar2(2000);
--Lv_counter number(10);
Lv_row_id_for_data_compare_log number(10);
Lv_old_table_record_count number(10);
Lv_old_table_rec_cnt_query varchar2(200);
Lv_new_table_record_count number(10);
Lv_new_table_rec_cnt_query varchar2(200);
begin
select max(row_id) into Lv_row_id_for_data_compare_log from data_compare_log;
Lv_old_table_rec_cnt_query := 'Select count(*) from '||fp1_old_table||' '||fp4_restriction_clause;
dbms_output.put_line(Lv_old_table_rec_cnt_query);
execute immediate Lv_old_table_rec_cnt_query into Lv_old_table_record_count;
Lv_new_table_rec_cnt_query := 'Select count(*) from '||fp2_new_table||' '||fp4_restriction_clause;
execute immediate Lv_new_table_rec_cnt_query into Lv_new_table_record_count;
dbms_output.put_line(fp5_recrtiction_clause_4_ins);
if (Lv_row_id_for_data_compare_log is null)
then
Lv_row_id_for_data_compare_log := 1;
else
Lv_row_id_for_data_compare_log := Lv_row_id_for_data_compare_log + 1;
end if;
Lv_insert_data_compare_log := 'insert into data_compare_log values('||Lv_row_id_for_data_compare_log||',''comparing data for '||fp1_old_table||' and '||fp2_new_table||''','''||fp1_old_table||''','''||fp2_new_table||''',TO_DATE('''||to_char(sysdate,'DD-MON-YY HH24:MI:SS')||''',''DD-MON-YY HH24:MI:SS''),'||fp3_data_compare_id||','||Lv_old_table_record_count||','''||'Select count(*) from '||fp1_old_table||' '||fp5_recrtiction_clause_4_ins||''','||Lv_new_table_record_count||','''||'Select count(*) from '||fp2_new_table||' '||fp5_recrtiction_clause_4_ins||''')';
dbms_output.put_line(Lv_insert_data_compare_log);
execute immediate Lv_insert_data_compare_log;
commit;
-- tested : dbms_output.put_line(Lv_insert_data_compare_log);
Lv_common_column_names := f_fetch_common_column_names(fp1_old_table,fp2_new_table,fp3_data_compare_id);
-- tested : dbms_output.put_line(Lv_common_column_names);
Lv_primary_column_name := f_extract_pkey_column_names(fp1_old_table, fp2_new_table);
dbms_output.put_line(Lv_primary_column_name);
p_compare_data(fp1_old_table,fp2_new_table,Lv_common_column_names,Lv_primary_column_name,fp4_restriction_clause,fp3_data_compare_id);
end;
CREATE TABLE RAHULKALRA.DATA_COMPARE_TABLE_SETUP
TABLE_ID NUMBER(10),
TABLE_NAME VARCHAR2(100 BYTE),
OLD_SCHEMA_NAME VARCHAR2(100 BYTE),
NEW_SCHEMA_NAME VARCHAR2(100 BYTE),
RESTRICTION_CLAUSE VARCHAR2(500 BYTE),
RESTRICTION_CLAUSE_INS VARCHAR2(500 BYTE),
DATA_COMPARE_ID NUMBER(10)
Insert into DATA_COMPARE_TABLE_SETUP
(TABLE_NAME, OLD_SCHEMA_NAME, NEW_SCHEMA_NAME, DATA_COMPARE_ID, RESTRICTION_CLAUSE, RESTRICTION_CLAUSE_INS)
Values
('W_CHNL_TYPE_D', 'BIAPPS_11', 'RAHULKALRA', 1, 'WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')', 'WHERE W_INSERT_DT >= TO_DATE(''''''''01/JAN/2012'''''''',''''''''DD/MON/YYYY'''''''') OR W_UPDATE_DT >= TO_DATE(''''''''01/JAN/2012'''''''',''''''''DD/MON/YYYY'''''''')');
Insert into DATA_COMPARE_TABLE_SETUP
(TABLE_NAME, OLD_SCHEMA_NAME, NEW_SCHEMA_NAME, DATA_COMPARE_ID, RESTRICTION_CLAUSE, RESTRICTION_CLAUSE_INS)
Values
('RAHUL_EMPLOYEES', 'BIAPPS_11', 'RAHULKALRA', 1, 'WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')', 'WHERE W_INSERT_DT >= TO_DATE(''''''''01/JAN/2012'''''''',''''''''DD/MON/YYYY'''''''') OR W_UPDATE_DT >= TO_DATE(''''''''01/JAN/2012'''''''',''''''''DD/MON/YYYY'''''''')');
I am facing the following error for this command when I call P_compre_data_utility procedure from my anonymous block:
P_COMPARE_DATA_UTILITY(Lv_args_4_data_compare_utility); -- the error is pasted below
if I do a dbms_output.put_line(Lv_args_4_data_compare_utility) and then copy paste its output and call P_COMPARE_DATA_UTILITY, the procedure is getting executed, here is that command :
P_COMPARE_DATA_UTILITY('BIAPPS_11.RAHUL_EMPLOYEES','RAHULKALRA.RAHUL_EMPLOYEES',1,'WHERE W_INSERT_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'') OR W_UPDATE_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'')','WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')');
Error:
ORA-06550: line 27, column 7:
PLS-00306: wrong number or types of arguments in call to 'P_COMPARE_DATA_UTILITY'
ORA-06550: line 27, column 7:
PL/SQL: Statement ignored
Question : just want to know whats wrong with : P_COMPARE_DATA_UTILITY(Lv_args_4_data_compare_utility);
please help me.
Regards
Rahul

Mac_Freak_Rahul wrote:
Hi All,
I am really sorry, my head is so aching since I am not a regular plsql coder and to save my life I need to write this code for data comparison between 2 tables .. further sorry about calling p_data_compare utility stupidly : P_COMPARE_DATA_UTILITY(Lv_args_4_data_compare_utility);
I am calling it now using :
execute immediate 'exec P_COMPARE_DATA_UTILITY('||Lv_args_4_data_compare_utility||')';If you are sure the call works then, exec would not work since it is a SQLPLUS command.
try
execute immediate 'BEGIN P_COMPARE_DATA_UTILITY(''||Lv_args_4_data_compare_utility||''); END;';
PS: I can manually give table names to my utility , just need 60 tables to compare but would be great if I can work it out this eay.
2) I can sound very stupid since my head is aching I am not a regular plsql coder but from now on I would be one, please helpJust for your sake, to Compare 60 tables (Supposing you just want to verify count of records), you are writing an entire procedure; You might have completed this activity by now doing the manual way. By taking this way, you are investing time to generate a correct code (as you just mentioned not being a regular plsql developer) you are stuck with some un-identifiable issues.
As an alternate way, I would suggest you to export the data, after ordering, into a spreadsheet and then validate. Also, since it looks like you are comparing the data in the same database between schemas, you can also use the SQL Navigators Data Compare utility and there are many more readily available in market.
I would wish you the best if you still prefer taking the approach.

Similar Messages

  • How can I email a video clip I downloaded into my iPhoto library to my friends? I tried creating an email and attaching the clip but there is no sound and no picture when the 5 minute attachment "plays." How can I file= export it to them from iPhoto?

    How can I email a video clip I downloaded into my iPhoto library to my friends? I tried creating an email and attaching the clip but there is no sound and no picture when the 5 minute attachment "plays." How can I file=>export it to them from iPhoto?

    Have them install Quicktime on their PC's from Apple's website, that's the easiest fix.

  • Create BRF object and call in Webdynpro ABAP

    Hi,
    can you please let me know how can i create BRF obejects and call them in webdynpro ABAP in WDC.
    Thanks,
    Mahesh.Gattu

    Hi Sachin,
    I am new to BRF,and i went through the BRF documents which are provided in Help.sap.Now my requirement is ,I have an webdynpro screen to create a policy number.When i click on Save all the fields should be validated through BRF.Being new to this environment,i need a start up help to achieve this.Please let me know the steps to validate the fields in webdynpro.
    Thanks
    Naresh Bammidi

  • Creating and calling stored procedure using jdbc

    When I try to create and call a stored procedure using JDBC a very confusing error message about non-existence of the procedure just created is thrown. Using Informix database (IDS 10). Any pointers to point out what am doing wrong would be great!
    Thanks
    import java.io.FileNotFoundException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Scanner;
    public class CreateStoredProc {
    public static void main(String args[]){
    if (0 == args.length)
    return;
    try {
    Class.forName("com.informix.jdbc.IfxDriver");
    Connection conn = DriverManager.getConnection("jdbc:informix-sqli://10.76.244.120:30000/sampledb:INFORMIXSERVER=krisunda;user=root;password=cisco");
    String q = " create procedure runproc() "+
    " define i int; "+
    " let i = 0; "+
    " end procedure; "+
    " execute procedure runproc(); ";
    Statement stmt = conn.createStatement ();
    stmt.execute (q);
    } catch (Exception e) {
    e.printStackTrace();
    The stack trace:
    java.sql.SQLException: Routine (runproc) can not be resolved.
    at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3204)
    at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3518)
    at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2353)
    at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2269)
    at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2157)
    at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2132)
    at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:378)
    at com.informix.jdbc.IfxStatement.a(IfxStatement.java:1299)
    at com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1269)
    at com.informix.jdbc.IfxStatement.c(IfxStatement.java:989)
    at com.informix.jdbc.IfxStatement.execute(IfxStatement.java:875)
    at CreateStoredProc.main(CreateStoredProc.java:37)
    Caused by: java.sql.SQLException
    at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:373)
    at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3523)
    ... 10 more

    DriverManager.getConnection("jdbc:informix-sqli://10.76.244.120:30000/sampledb:INFORMIXSERVER=krisunda;user=root;password=cisco");check with ur sys admin wheather the particular user in the database has >execute privilage(rights) also.i mean execute the SP in the DB level.I guess that a root user will have the enough right.
    String q = " create procedure runproc() "+
    " define i int; "+<" let i = 0; "+
    " end procedure; "+
    " execute procedure runproc(); ";
    Statement stmt = conn.createStatement ();
    stmt.execute (q);Try to use the following code:
    String q = " create procedure runproc() "+
    " define i int; "+
    " let i = 0; "+
    " end procedure; "
    Statement stmt = conn.createStatement ();
    stmt.execute (q);
    q=" execute procedure runproc(); ";
    stmt.execute (q);
    Because maybe the driver failed to precompile your sql once, so that nothing happen.

  • Creating VO Dynamically and Copying Attributes

    Hi anyone,
    I've developed a SimpleSearch with LOVs that result in a multi-selection list.
    Once the rows are selected, I want to carry them over and display on the next page.
    I'm trying to keep it very simple, using OAFramework wizards an such but I'm struggling to get this accomplished, mostly due to lack of JAVA experience.
    I was trying to follow the advice from "How to show selected rows only in tablebean" but I don't know how to create a VO dynamically and am new to JAVA (which is why I tried to keep it simple).
    What I need help with desperately is:
    1) The correct syntax/code for creating a simple VO dynamically - examples in the OA Dev guide are hard to follow.
    2) Correct syntax/code for copying attributes using setAttribute().
    3) Does this new VO appear under the BC4J Components directory? If not, how do I attach it to the table's columns?
    4) Anything else I should include or watch out for?
    Thanks very much.

    Hi Ramkumar,
    I did create a VO declaratively before but am stuck on syntax again in the AMImpl.
    I'm getting the error: oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[10006 ].
    Could you look at my code and see what is missing?
    public void SelectItemInstance( )
    CustibSummaryVOImpl vo = getCustibSummaryVO1();
    CustibChangeVOImpl dvo = getCustibChangeVO1();
    Row[] sourceRows = vo.getFilteredRows("SelectFlag", "Y");
    // getFilteredRows returns a zero-length array if it finds no matches.
    if (sourceRows != null && sourceRows.length > 0)
    int numRows = sourceRows.length;
    for (int i = 0; i < numRows; i++)
    // For every row with a selected checkbox, we want call
    // the create( ) and insert()wrapper.
    Row newRow = dvo.createRow();
    newRow.setAttribute("ItemInstance", sourceRows.getAttribute("ItemInstance"));
    newRow.setAttribute("Item",sourceRows[i].getAttribute("Item"));
    newRow.setAttribute("TagNumber",sourceRows[i].getAttribute("TagNumber"));
    newRow.setAttribute("Client",sourceRows[i].getAttribute("Client"));
    newRow.setAttribute("Resp",sourceRows[i].getAttribute("Resp"));
    newRow.setAttribute("Service",sourceRows[i].getAttribute("Service"));
    newRow.setAttribute("Project",sourceRows[i].getAttribute("Project"));
    newRow.setAttribute("TCAAccount",sourceRows[i].getAttribute("TCAAccount"));
    newRow.setAttribute("OrderId",sourceRows[i].getAttribute("OrderId"));
    newRow.setAttribute("PartyId",sourceRows[i].getAttribute("PartyId"));
    newRow.setAttribute("AccountId",sourceRows[i].getAttribute("AccountId"));
    dvo.insertRow(newRow);
    } // end selectItemInstance()
    Thanks ever so much.

  • Create Context dynamicly and map it to ALV-Component

    Hey evrybody,
    I like to create a context and I want to map it to the component ALV_CONFLICT.
    Creating the context is not the problem, but I tried to map the context by using the set_data method of the interface IWCI_SALV_WD_TABLE and when I try to call the view embeded the ALV_CONFLICT component I get the following mistake:
    Folgender Fehlertext wurde im System E8D prozessiert: Component Usage ALV_CONFLICT Does Not Have an Active Component
    Thanks so far and Kind Regards,
    Henning

    Hi,
    Instantiate your component using code wizard before calling the set_data method of interface controller.
    *Instatiate used controller
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      lo_cmp_usage->create_component( ).
    endif.
    data lo_interfacecontroller type ref to iwci_salv_wd_table .
    lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
    lo_interfacecontroller->set_data( lo_node ).

  • Hi. how to create Subroutine Pool and call it from sapscript

    HI,
    Can anyone tell is there any standard subroutine pool available which could fetch the customer number. 
    how to create an subroutine pool and call it from the sapscript..
    please help me
    Advance Thanks..
    Guhapriyan.

    Hi Guhapriyan,
    1. Create a FORM in your program.
    2. call it from sapscript using
    /:   PERFORM GET_COMPANY_INFO IN PROGRAM YHRR_OFFER_CONTRACT_FORM      
    /:   USING &P0001-BUKRS&                                               
    /:   CHANGING &COMP_NAME&                                              
    /:   ENDPERFORM                                                        
    3. The form in your program should be of the following  parameters only.
    form GET_COMPANY_INFO tables IN_PAR  structure ITCSY
                            OUT_PAR structure ITCSY.
    (important is IN_PAR, OUT_PAR -
    where in your read the values passed,
    and pass back the values
    thru internal table using varname, varvalue)
    regards,
    amit m.

  • Error while creating VO dynamically and assigning it to Table Region

    Hi,
    I am getting the below exception while running my OAF page
    oracle.apps.fnd.framework.OAException: Programming error. Row (oracle.jbo.server.ViewRowImpl@1e) must be of type oracle.apps.fnd.framework.OARow.
    I've created a dynamic VO using createViewObjectFromQueryStmt(), and used setViewUsage() on messageStyledTextBean of my table.
    Couldn't find anything related to the error on forum.
    Any sort of help is appreciated.

    Check in Corresponding VORowImpl ---
    change the Import Statement -- from -
    import oracle.jbo.server.ViewRowImpl; // 11i
    to
    import oracle.apps.fnd.framework.server.OAViewRowImpl; // R12
    Hope This will help Out..

  • Trying to create new user and getting remote procedure call error

    I'm trying to create a new user on my windows 8.1 machine but it's not letting me.
    If i open control panel and go to user accounts there's not even an option to add a new user. It's like it's missing, there si a blank space where the link should be. I can change my current account type, and manage another account (though that takes me
    to the list of accoutns which shows mine and the guest, but no option to add a new one) or change user account control settings.
    If i open the run menu and type "users" there is a program that shows up labeled "add, delete and manage other user accoutns" but if I click that a dialog pops up with the following message
    I've run sfc /scannow and it says there are corrupt files but that it couldnt repair them and logged them in the CBS.log

    OK I tried to run sfc /scannow again, and it said files needed to be fixed on a reboot. I rebooted and I can now create user accounts. So never mind, folks!
    Kyle

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Create an image and not display it but saving it as a gif

    hi there,
    i want to save an offImage as a gif. i have something like this (just the main lines)
    JPanel jp = new JPanel()
    Image img = jp.createImage(w,h);
    Graphics gph = img.getGraphics();
    gph.draw...
    I've got an encoder class (GifEncoder) which works just fine with an image created as in the example above.But I don't want to display the image. Just create it, draw on it and save it
    Unless i display the image (in the Panel, e.g. jp) I cannot save the picture as a gif. So I must register it with a component. Is there a way I can avoid this?
    Thank you

    I use the following which is for JPEG encoding but should work for GIF:
                                  BufferedImage tempBImage = new BufferedImage(320,240,BufferedImage.TYPE_INT_RGB);
                                  Graphics2D g = tempBImage.createGraphics();
    g.draw~~~(~~~); //do your stuff here
         //Create a fileoutputstream.
         FileOutputStream fos;
         fos = new FileOutputStream(thumbDirString+ "\\" + picName);
         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(fos);
         encoder.encode(tempBImage);
         fos.flush();
         fos.close();

  • Dynamic object called in Procedure

    Hi ,
    Let me first explain the requirment of my prj.its telecom based prj.There are various types of network equipment.So i have created the object for those equipment.
    for ex
    CREATE TYPE 16x AS OBJECT (...._);
    CREATE TYPE 4x AS OBJECT (...._);
    Now I have to write a procedure in which we just pass the eqipment name .
    for ex 16x
    Now as soon as I pass the eqipment name the procedure should direclty select the varaible of object 16x.
    SO how is possible to select the variable along with associated objectstype of the equiment at runtime only.
    Hope someone can answer my question.
    Thanks in advance.

    .So i have created the object for those equipment.Why are you using objects? The Oracle o-o implementation is not complete, and (in my opinion) not very useful outside of some rather unusual scenarions. Find out more.
    Anyway, let's assume your motives are good. It's also not clear precisely what you have done, so it's difficult to be sure what your problem is. What I would do woyuld be to create a master type of NETWORK_EQPT and then extend that to specific types - 16x, 4x. You can then write a function to instantiate a NETWORK_EQPT object which will figure it all out and return the appropriate subtype....
    SQL> create type network_eqpt as object (type varchar2(3), name varchar2(30))
      2  not final
      3  /
    Type created.
    SQL> create type net_16X under network_eqpt (capacity number)
      2  /
    Type created.
    SQL> create type net_4X under network_eqpt (start_date date)
      2  /
    Type created.
    SQL> create or replace function new_nw
      2      (p_type varchar2, p_name varchar2
      3          , p_capacity number := null, p_start date := null)
      4  return network_eqpt
      5  is
      6      return_value network_eqpt;
      7  begin
      8      if p_type = '16X' then
      9          return_value := net_16X(p_type,p_name, p_capacity);
    10      elsif  p_type = '4X' then
    11         return_value := net_4X(p_type,p_name, p_start);
    12      else
    13         return_value := network_eqpt(p_type,p_name);
    14      end if;
    15      return return_value;
    16  end new_nw;
    17  /
    Function created.
    SQL> select new_nw('APC', 'Not a network') from dual
      2  /
    NEW_NW('APC','NOTANETWORK')(TYPE, NAME)
    NETWORK_EQPT('APC', 'Not a network')
    SQL> select new_nw('16X', 'Recognised type', 89) from dual
      2  /
    NEW_NW('16X','RECOGNISEDTYPE',89)(TYPE, NAME)
    NET_16X('16X', 'Recognised type', 89)
    SQL> Be aware that the above is just a sample of what can be done rather than a indication of the correct way to program it.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Updating HTML code dynamically and calling a URL

    Hi All,
    I have the following requirement -
    Consider the below HTML code:
    In the above code, the URL >>
    https://secure3.i-doxs.net/nytimes/BillaccessView.asp has to be called and this should PICK UP the values from the above code - For example: Client and ABCCO. In other words, the page that is going to be displayed by specifying the URL should use the values that are dynamically generated and specified in the above code. 
    Please let me know if you have any inputs on how to achieve this.
    Best Regards,
    Rajeev

    Hi there ,
    i have a solution for your problem as follows :
    Do not mention the action in form tag ; do it as follows .
    if you have a submit button then use following code in onclick even of submit as onClick="do_this()"  else use onsubmit="do_this()" in <form > tag .
    Include the following <script> </script> in Head element .
    the JS function do_this should be as follows :
    <Script language="JavaScript">
    function do_this()
       var w_ele;
       w_ele = document.getElementById('CLIENT') ;
       w_client = w_ele.value ; // this will give u the name entered in client text field ie. ABCCO in this case.
    var w_url = "https://secure3.i-doxs.net/nytimes/BillaccessView.asp?w_clien="+ w_client ;
      w_form = document.getElementByID('FRM_MAIN');
      w_form.action = w_url ;
    /*this will call the url as "https://secure3.i-doxs.net/nytimes/BillaccessView.asp?w_client=ABCCO" */
    </script>
    NOTE :
    you need to define ID property for form and text element . currently you have used juse name property .
    in the w_url , before' ? ' the name of the parameter in which you want to capture the dynamic client value in target should appear ( i have used w_client just as an example)
    so modifications needed in ur HTML as :
    <FORM name="frmMain"  id="FRM_MAIN" method="POST">
    and
    <TD> First Name: </TD><TD><INPUT type="text" id="CLIENT" name="Client" value="ABCCO" size="50" maxlength="32"></TD>
    I am sure this will solve ur problem as i have done the same thing. if not then feel free to mail me at [email protected]
    do reward me points if found useful.

  • I just got my new iphone 4 in the mail and used my friends computer with itunes already on it to set it up since i dont own a computer. She owns an iphone already so her stuff was there already. i created an account and unlocked the phone but now it says

    it now says no service at the top. help/

    If the iPhone is locked to a telephone operator, your Sim Card has to be from that telephone operator.  Otherwise, the iPhone will not be able to read the Sim Card and obtain telephone service.

  • I loose text of emails randomly; I have tried the properties and fix file procedure, but will not work;

    I use W7 and TB 31.2; when I sign on to Comcast.net, all message text is fine; if I forward the Comcast emails that failed on TB they then come through fine on TB with all the text; Should I reload TB? Would I loose my emails?

    https://discussions.apple.com/docs/DOC-6131

Maybe you are looking for

  • Officejet Pro 8600 all in one installation on dest top with AMD64 chip set and Window 7

    Can't install an HP Pro 8600 all in one with full features on a Desktop with windows 7 64 bit OS, PC has an AMD chip set, connection is wireless. This printer is replacing an HP Pro 8500 all in one that failed. HP's only solution was to upgrade to th

  • Os 9 won't start anymore

    Hi, I received a semi working powerMac G4 Cube from a freecycle community, and while initially it worked fine, I had to dissemble the unit to replace the dvd drive which had a dvd stuck in it. I used one from a second unit that I was also given and I

  • How to stop a "Free" process??

    Hi, we are implementing a "Recycle Bin" folder in user's home folder. When a user delete a file, if this file is not already in Recycle Bin, we want to move it there, and then stop it from being "Freed". I'm overriding S_TieDocument extendedPreFree m

  • RE:ABAP HR infotype 2001 document number

    Hello All, When we save a record in infotype 2001 (Absence) in Pa30 it creates internally a document  number.I wanted to know is there any Tcode where we can see this document number? I know the BAPI name but i want the tcode where we can see the doc

  • Can't upload picture on my Asha 303

    Hi, i have Nokia 303 and my phone suddenly stopped uploading pictures, i dont know why. Moderator's Note: The title of the thread was amended as well as the following post as it was moved from another thread.