Data retrieve from array PL/SQL is "???"

Hi,
I follow the sample code shown in getting the data of PL/SQL using Java.
Please see below:
OracleCallableStatement stmt =(OracleCallableStatement)conn.prepareCall
( "begin ? := getEMpArray; end;" );
// The name we use below, EMPARRAY, has to match the name of the
// type defined in the PL/SQL Stored Function
stmt.registerOutParameter( 1, OracleTypes.ARRAY,"EMPARRAY" );
stmt.executeUpdate();
// Get the ARRAY object and print the meta data assosiated with it
ARRAY simpleArray = stmt.getARRAY(1);
System.out.println("Array is of type " + simpleArray.getSQLTypeName());
System.out.println("Array element is of type code "+simpleArray.getBaseType());
System.out.println("Array is of length " + simpleArray.length());
// Print the contents of the array
String[] values = (String[])simpleArray.getArray();
for( int i = 0; i < values.length; i++ )
System.out.println( "row " + i + " = '" + values<em> +"'" );
But when i view the data from java the data that is being fetch is "???". All the array data is like this "???". :(
But when i debug the PL/SQL the data is OK.
I dont know if this is a binary numbers or what.
I dont know how to solve this. And get the real data.
Please help.
By the way, i'm using eclipse as the IDE.
Thanks.</em>

I'm guessing that your database NLS_Language settings don't match your clients.
Go into the project properties->compiler->encoding and choose the right caracter set to match your database's one.

Similar Messages

  • Tell me how to format a date retrieved from a MS SQL Server 2000 database?

    Tell me how to format a date retrieved from an MS SQL Server 2000 database for various uses in my JSP page?

    Or if you want to use JSTL instead of a scriptlet see:
    http://forum.java.sun.com/thread.jspa?threadID=676754&tstart=0

  • Data Retrieval from SSRS 2008 R2 to SQL Server 2012 standard

    Hello,
    We have a virtual machine running SSRS 2008 R2 and a physical server running SQL server 2012 standard.  We are having an issue with a report that is taking almost 10 minutes for the data to be retrieved from the sql 2012 database.  We used the
    execution logging query to debug and analyze.  We see that it renders and processes very fast, but the data retrieval time is very slow.  When the same query is run using sql studio mgr. from the SSRS server it runs just fine...it
    takes seconds for the results to come up.
    I don't believe there is a compatibilty issue because other reports run fine.  We're just having problems with one report.

    A long shot, but I've seen where the data type of a report parameter is mismatched against the data type of the table it is being compared against.  SQL profiler would show this clearly.  
    This would explain why the query returns quickly in ssms but not with the report.  

  • Can I use stored procedures to improve data retrieval from the database?

    I have been requested to get multiple pieces of data from multiple tables and return the output in an array for use in a Java program.
    Eliminating multiple calls to the database. Currently, the data is retrieved from the database in multiple steps but to eliminate
    possible bottlenecks in the future, I created several complex sql statements.
    For instance,
    In the first table there are 20 columns of data. has a column named type which can have the one of these values: line, inn, or bsc
    In the second table there are 6 columns of data. has the additional data for type line
    In the third table there are 7 columns of data. has the additional data for type inn
    In the fourth table there are 2 columns of data. has data regardless of type
    etc...
    Depending on a specific column value retrieved (inn) from the first table:
    I need to collect all 20 columns in the first table and get all the columns in third table and the columns in the fourth table, etc.
    Question: How can I remove the duplicate primary key columns without specifying for each table the column names to be returned?
    I used the wildcard SELECT * because I didn't want to have to update the retrieval methods if additional columns are added to these
    secondary tables.
    example of my sql for type inn data:
    select * from first_table f, third_table s, fourth_table t
    where (f.column1='xxxx' and f.column2='xxxx') (the 'xxxx' are passed into the sql statement)
    and
    ((s.column1=f.column1 and s.column2=f.column2)
    and
    (f.column3=t.column1));
    Currently, I've duplicated the separate sqls for each valid type found in the first table (at least a dozen types). The only difference is
    the table name. Instead of the third table I use the second table, etc.
    The MAIN Question: How can I set this up to have one sql to handle each type? I want to eliminate having over a dozen duplicated sqls. Can I
    incorporate this into a stored procedure or something? If so, how? Can anyone provide sample coding?
    Your help is very much appreciated. Thank you.
    GD

    Hi, Salah.
    Use "Exec" in your query to run procedures.
    SAPbobsCOM.Recordset     oRS;
    oRS = (SAPbobsCOM.Recordset)pCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
    oRS.DoQuery ("EXEC YourStoredProcName");
    Triggers are not supported in SDK.
    Regards,
    Aleksey

  • Saving data retrieved from text file to JDBC table

    Hi,
    I would like to save data, loaded from a text file to a dataset, into an existing JDBC table.
    The documentation I found on this subject is very brief, and no matter how I tried, I couldn't succeed.
    I would appreciate any help.
    Thank you in advance

    Hi there,
    Here is an example of reading a String and a date from a text file. Once you have what you need in the Strings (or whatever) it should be easy to insert them into and SQL statement. Let me know if you need an example of this as well and I'll post it in the morning. Right now I'm off to bed :o)
    Cheers
    Mark
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class WriteTest {
    public static void main(String [] arg) throws Exception {          
       Date today = new Date();          
       String name = "";          
       SimpleDateFormat formatter = new SimpleDateFormat("ddMMyyyy");          
       File myfile = new File("hello.txt");               
       // how to input     
       BufferedReader in = new BufferedReader(new FileReader(myfile));          
       String name="",
       date="";          
       boolean eof = false;          
       do {
          name = in.readLine();               
          date = in.readLine();               
          if(!(eof = (name==null || date==null)))                    
          System.out.println(name+" "+formatter.parse(date));
       while(!eof);     
    }

  • Data transfer from sybase to sql server

    Hi ,
    we are pulling data from sybase to sql server using ssis pacakges.
    a column of type bit in sybase is transferred as int in sql server.
    but because of that the value of sybase column as 1  is transfered as -1 in sql server till now .
    suddenly the value is now coming as 1 in sql server.
    can anybody tell me what could be going wrong here ?
    please help
    thanks in advance

    If its a bit field in sybase the corresponding datatype should be bit itself in SQLServer. Bit is boolean based data having values as only 0 and 1 (and NULL also if columns in nullable). int datatype can hold any integer data so they both are not same.
    Also a bit value of -1 is invalid and makes no sense
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Data retrieval from sad face ipod

    So, two nights ago my ipod (40gig 3rd gen(? 4th? 1.5 years old; warranty expired)) randomly died while in the middle of playing music. It whirred and clicked and eventually gave me the unhappy face, and that is how it's stayed for the past 48 hours. Now, there are plenty of people in this same boat, as a little browsing of the forums has showed me, so I'm not asking for how to possibly fix it, but...
    What I do want to know: is there a service to get the data off the ipod? Reformatting the machine is all fine and good, but I'm living abroad and most of my CDs are currently on the other side of the world. My friend said that you could pay $50 for Apple to retrieve the data from your old drive, but I haven't seen anything like that on the website (perhaps it is only for Macs?)
    Anyway, has anyone heard of a data retrieval service for ipods, or some other method of getting data off an ipod that won't connect to the computer? (I tried putting it in data mode and it just laughed at me...or frowned, I suppose.)
    Thanks for any advice you can give...
      Windows XP  

    Is your iPod fully charged? (connect it to the Mac for 4 hours to charge the battery)
    Your post is not very clear on the problem, but normally Resetting the iPod will get rid of the sad face, on the iPod sceen, but may not get rid of your unhappy face.
    To Reset - Press Menu and Center Button for about 10 secs till the Apple logo comes ON.
    Here is the support document that may help you.
    http://support.apple.com/kb/TS1373?viewlocale=en_US
    Good Luck & Have a nice day!

  • Data retrieval from ZL table

    I need to retrieve data from ZL table and prepare a report comparing the Actual, Previous and Old records in the table for an employee for a particular period.
    Are there any particular function modules for this data retrieval?
    Thanks.

    Hi bala,
    I did not get what you were trying to tell me. I went to SE37 and tried for anything that starts with "zlit" .. but returned no results.
    And also I dont want time management to payroll.
    I want to retrieve data from the B2 in PCL2 cluster.
    i.e I want to retrieve data from the ZL table in the cluster for a particular payperiod and particular employee.
    Thanks very much in advance!

  • Data retrieval from JMS queue using single SOA composite in a clustered env

    Hi,
    I have following situation:
    1) A requester SOA composite (Composite1)is reading data from a File
    2) Mediator is routing data received from Composite1 and writing in a JMS queue.
    3) A provider composite (Composite2) is reading from the JMS queue.
    Both Composite1 and Composite2 is deployed in a clustered environment.
    Problem is Composite2 is not able to read data sequentially from JMS Queue sometime (for example out of 30000 transactions its failing once). Here it's a queue and only one producer and only one consumer is there.
    What may cause this issue? I thought a single producer and single consumer on a queue will guarantee FIFO retrieval . Could you please advise where may be the gap?
    Thanks
    Edited by: user1054373 on Sep 18, 2012 11:29 PM

    Hi,
    I thought a single producer and single consumer on a queue will guarantee FIFO retrieval Java Message Service Specification does not guarantee ordered message delivery when applications use distributed queues...
    Using Weblogic Message Unit-of-Order may solve your issue...
    http://docs.oracle.com/cd/E23943_01/web.1111/e13727/uoo.htm#JMSPG389
    Hope this helps...
    Cheers,
    Vlad

  • Fast data retrieval from large tables

    Hello,
    we have created a table in oracle 10g DB. at an average there are around 20-30 rows inserted onto the table. so in 1 mnth the record count for the table is around 800-900 rows.
    in one year which is becoming to 10,000 rows. so speed up data retreval from this bulk data we need suggestion. various things that come to my mind are -
    Indexing of table/# Index of table/partitioning of table/materialized view etc.
    but not sure what exactly needs to be done here. please suggest on how smooth data retreival can be chaived whatever be the size of the table.
    Thanks,
    Sam

    Here is a simple look of your data progression.
    year        Row
    1           10,000
    5           50,000
    10          1,00,000
    50          5,00,000
    100         10,00,000You need to wait another 100 years to reach a million. And million is not a big number when it comes to Oracle.
    So as others have stated what the objective behind your question?
    basically the choice of Index or Partition mainly depends on how the data is going to be accessed from a table. If I am going to access all the rows of a table every time then there is no use of both the features. I would just prefer a FTS. In that situation i would be looking how to optimize my FTS.
    So you need to set you objective clear before picking up the solution. Just because you have a hammer you cant go around banging the wall ;)

  • Data retrieval from failed ibook hard drive

    my ibook G4's hard drive failed after about 18 months, which is ridiculous in itself. they tell me i have to send it off somewhere for data retrieval.
    WHERE is a good place to do this? i need the data.

    Hey Christopher.
    Have you already removed the HD?
    Do you have access to another Mac where you could try Target Disk Mode ? It may be worth a try and shouldn't cost you a thing.
    If you are willing to buy some software, Alsoft's DiskWarrior has helped crack some pretty tough looking jobs.
    If your drive has not completely failed either one of these may work. Target Disk Mode is worth a try as it won't cost you a thing but time.
    Edit: As Ryan M said, in the future backup...backup....backup.....backup.

  • Data retrieve data from array PL/SQL is "???"

    Hi,
    I follow the sample code shown in getting the data of PL/SQL using Java.
    Please see below:
    OracleCallableStatement stmt =(OracleCallableStatement)conn.prepareCall
    ( "begin ? := getEMpArray; end;" );
    // The name we use below, EMPARRAY, has to match the name of the
    // type defined in the PL/SQL Stored Function
    stmt.registerOutParameter( 1, OracleTypes.ARRAY,"EMPARRAY" );
    stmt.executeUpdate();
    // Get the ARRAY object and print the meta data assosiated with it
    ARRAY simpleArray = stmt.getARRAY(1);
    System.out.println("Array is of type " + simpleArray.getSQLTypeName());
    System.out.println("Array element is of type code "+simpleArray.getBaseType());
    System.out.println("Array is of length " + simpleArray.length());
    // Print the contents of the array
    String[] values = (String[])simpleArray.getArray();
    for( int i = 0; i &lt; values.length; i++ )
    System.out.println( "row " + i + " = '" + values +"'" );
    But when i view the data from java the data that is being fetch is "???". All the array data is like this "???".
    But when i debug the PL/SQL the data is OK.
    I dont know if this is a binary numbers or what.
    I dont know how to solve this. And get the real data.
    Please help.
    Thanks.
    Edited by: user652585 on Oct 22, 2008 9:02 AM

    I'm guessing that your database NLS_Language settings don't match your clients.
    Go into the project properties->compiler->encoding and choose the right caracter set to match your database's one.

  • Difference in data retrieved from sql developer and sqlplus prompt

    SQL> select distinct snap_time from perfstat.stats$idx_stats;
    SNAP_TIME
    21-MAY-07
    05-JUN-07
    but using sql developer
    select distinct snap_time from perfstat.stats$idx_stats;
    SNAP_TIME
    21-MAY-07
    05-JUN-07
    13-JUN-07
    but can anyone explain the difference because it's the same database

    SQL> select distinct snap_time from
    perfstat.stats$idx_stats;
    SNAP_TIME
    21-MAY-07
    05-JUN-07
    but using sql developer
    select distinct snap_time from
    perfstat.stats$idx_stats;
    SNAP_TIME
    21-MAY-07
    05-JUN-07
    13-JUN-07
    but can anyone explain the difference because it's
    the same databaseIt looks to me during the interim between you run the query in sqlplus and SQL Developer, statspack generated a new snapshot.
    Check your DBA_JOBS see if there's any auto statspack collection job.

  • How to transfer data retrieved from a bean, into requestScope

    I have a jsf page called viewCustomer.jsp, which is backed by a controller/mbean with a name viewCustomerController.
    This page is always called via a request which carries the customer accountID in its request attributes. Hence in order to load the customer details i am using a f:view beforephase call which acts before the render phase. This retrieves a number of beans from of different types. For example, each customer can have an address.
    each addressbean has an ID field which is the primary key to the addresses. If i want to delete the address, i need to send this primary key via a requestAttribute to a controller which will delete it.
    hence to delete the address i have a form such as:-
    <h:form>
    <h:inputHidden value="#{viewCustomerController.customerAddressBean.id}" />
    <h:commandButton value="Delete Address" action="#{viewCustomerController.deleteCustomerAddress}" />
    </h:form>
    The problem with this, is that because the addressbean is only added before the render phase, on presssing the delete address button, i get a null exception, because customerAddressBean doesnt exist yet.
    What i want to do, is that upon pressing the delete address button, the id value should be immediately sent to a requestAttribute called 'addressId', and not back to the backing bean.
    i. e. (if jsf had an assignment operator) it would be something like
    <h:form>
    <h:inputHidden value="requestScope.addressID = #{viewCustomerController.customerAddressBean.id}" />
    <h:commandButton value="Delete Address" action="#{viewCustomerController.deleteCustomerAddress}" />
    </h:form>
    basically, the data should be read from the backing bean, but it shouldnt be written back to the backing bean.
    now i realize that if i allow my database to repopulate the backing bean earlier, the customerAddressBean will be populated, and then the first listing would work. But that would require a second set of trips to the database with no meaning but to repopulate the backing bean which seems like quite a waste.
    In the case of the address, i could populate the propertly with a dummy addressbean, but this would not work in the case of properties which are lists of beans.
    So in summation. How do i transfer data that has been read from a property of a backing bean, into a request attribute on a commandbutton click, without putting the data back into the property of the backing bean.

    Hello Anu,
    There are different hardware options that you have here. The basic things that you need to keep in mind is that the PDA that you purchase runs on Pocket PC and has either a CompactFlash or a PCMCIA slot in it. The driver that you would be using for your LabVIEW PDA application would NI-DAQmx Base Ver 2.0.1. You can refer to its readme for more information on the supported hardware. Also you can check at this page for more information on the supported devices. About your original question, using LabVIEW PDA you can create a text file for storing data and separate the data points with a comma. So that this way you would be able to open the file in Excel if you wanted to. All the file I/O related VIs can be found in the function palette at Programming >> File I/O.
    Regards,
    Chetan K.
    Application Engineer
    National Instruments

  • Data retrieval from a loaded tree in WD ABAP

    Hi All,
             I have a node 'ENTRY' and have a recursive sub node called 'SUB_ENTRY' now assume that i have created a 10 level tree by creating 9 recursive nodes. Now i would like to fetch or retrieve all the data from this tree.
          So can you pls tell me if there exists a method to do it in one go or will i have to use GET_TABLE_FROM_NODE for every node ..
    Thanks for your help.
    Regards,
    Anoop

    Yes Thomas you are right about the use of ByKey and NestingColumn but the thing is that as far as application development is concerned then i am done with that .. but it was to improve the performance of this application that i needed to know if i can retrieve the already available data from this tree instead of calling the FMs again which is very costly ...
    anyways thanks for your response.
    Regards,
    Anoop

Maybe you are looking for

  • Search help for default value

    Hi all.. I doing a dialog program. I need to have a search help in my input field. How can i do it? I want to have 3 default value in the search help. example: apple, orange, pear. How to retrieve it?

  • VAT-MM Pricing Procedure

    hI IUn SAP VAT is calculated on Basic price -discount +ED. Our requirement is that VAT is to be calculated on Basic price-discount +ED +Freight . Could any one help me how to achieve this?

  • Export/Import with apps user or EUL schema owner ?

    Hi, I am working with a migration plan to move Discoverer 9 to Discoverer 10. It is an apps mode EUL, where business areas and workbooks have been granted to Apps Users & Responsibilities. Customer has only maintained the EUL with the database user o

  • Cannot export to movie without media encoder!

    Past workflow has involved exporting an avi to a watch folder. With CS4 I cannot export an avi without using the media encoder. I see no problem with using the encoder to do the work, but there are instances when I would want to export "same as sourc

  • Why has my phone stop texting galaxy s4

    My phone no longer text a galaxy s4 it can call but not text?