Problem retrieving data from a JTable.

Hi All,
I've just searched to 45th page of this forum but I heven't found a topic containing infos that can help me.
Well, my problem is: I have to retrieve data from a JTable. I use getValue() method but it seems to work well on all cells of a row but the last cell. I use the TAB to move focus on the row and when it is on the last cell, using TAB, the focus jumps on the next row & 1st column.
Using TAB moving on system, I can retrieve all data but data on the last cell data.
I add another info hoping someone has a solution for my problem: If the focus goes back on the last cell of a row just edited, in this case the data retrieving work as well.
Thank you for your attention!
Bye.

I don't understand your question. I don't understand what using Tab and getValueAt(...) have to do with one another. If you want data from a cell then just use getValueAt(...).
If you want to know what cell currently has focus you use
getSelectedRow()
getSelectedColumn()

Similar Messages

  • "evdre encountered a problem retrieving data from the webserver"

    Hi
    We are using a big report which takes very long time to expand and sometimes we get the error message "evdre encountered a problem retrieving data from the webserver" when expanding the report, but not very often for most of our users. But we have one user who gets this error message almost every second time he expands the report. This user have a computer with same capacity as the rest of us, can there be some setting on the computer or in the client installtion the cause this problem?
    We are using BPC 5.1 SP 5
    /Fredrik

    Hi,
    This error occurs usually if we have huge data in combination of our dimensions.
    Even, if the selection of your memberset is not apt to the combination of the data present in the back end, you may encounter a data retrival error.
    regards
    sashank

  • SP 2013 Designer Workflow problems retrieving data from Web Service

    Hi all,
    I am creating a SharePoint 2013 Designer Workflow, and I am having trouble retrieving data from a web service. The web service URL is
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers and the problem I am having is with the SharePoint Designer Workflow “Call HTTP Web Service” action URL. The URL I am
    having problems with is shown below:
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$format=json&$select=CustomerID,CompanyName,ContactName,ContactTitle,Address,City,PostalCode,Country,Phone,Fax
    or
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$select=CustomerID,CompanyName,ContactName,ContactTitle,Address,City,PostalCode,Country,Phone,Fax&$format=json
    The SharePoint 2013 Designer workflow works OK if I try to retrieve two items like "CompanyName" and "ContactName", but when I try to retrieve three or more items the workflow doesn’t work it just pauses
    with no error message. The URL that works OK is shown below:
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$format=json&$select=CompanyName,ContactName
    or
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$select=CompanyName,ContactName&$format=json
    Does anyone know why I cannot retrieve more than two items from a web server? Am I making a mistake with the URL?
    I hope you can
    Colin

    Hi Amit,
    According to your description, my understanding is that you want to approve workflow task using web service in SharePoint 2013.
    For troubleshooting this issue, please provide the more detailed code.
    Here are some similar posts, please check if they are useful:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/b999a417-dce3-4590-9173-89aea91f23a3/complete-workflow-after-approving-all-tasks?forum=sharepointdevelopment
    http://www.sharepointblog.in/2013/07/programmatically-approvereject-task-in.html
    http://aarebrot.net/blog/2011/10/how-sloppiness-and-spworkflowtask-altertask-could-inadvertantly-lock-your-workflow-task/
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Problem retrieving Data from a CDATA-Section using XMLDOM

    Hello,
    Ware: Oracle 8.1.7.4 64bit, XDK for PL/SQL Version 9.2.0.3, Solaris8 64bit
    I can't retrieve Data from the CDATA-Section of an XML-String, neither with
    getData(DOMCharacterData) or substringData. Also getLength fails. I get always
    the following error:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException
    ORA-06512: at "XML_SCHEMA.XMLCHARDATACOVER", line 0
    ORA-06512: at "XML_SCHEMA.XMLDOM", line 853
    ORA-06512: at "SCHWABE.XML_TEST", line 47
    ORA-06512: at line 1
    I can successfully cast the DOMNode to a CharacterData with makeCharacterData
    and check with isNull (DOMCharacterData) (returns FALSE).
    My Testcase:
    1) A Function which build a XML-Document:
    CREATE OR REPLACE FUNCTION XML_ResponseCalc RETURN VARCHAR2 IS
    doc VARCHAR2(32767);
    BEGIN
    doc :=
    '<?xml version="1.0" encoding="UTF-8"?>
    <RSDecEng>
    <Version>1.00</Version>
    <ResponseCalc>
    <ID>00000000000000000014</ID>
    <Burst>
    <Definition>
    <Count>1</Count>
    <ID>
    <Start>1</Start>
    <Length>4</Length>
    </ID>
    <Var>
    <Name>Risiko_1</Name>
    <Start>5</Start>
    <Length>5</Length>
    </Var>
    </Definition>
    <Data>
    <Length>9</Length>
    <Count>5</Count>
    <![CDATA[
    1 0.001
    2 0.002
    3 0.003
    4 0.004
    5 0.005
    6 0.006
    7 0.007
    8 0.008
    9 0.009
    10 0.010
    ]]>
    </Data>
    </Burst>
    </ResponseCalc>
    </RSDecEng>
    2) The Procedure which parses the XML-Document (no Exception-Handling):
    CREATE OR REPLACE PROCEDURE XML_TEST IS
    Parser XML_SCHEMA.XMLParser.Parser;
    DOMDocument XML_SCHEMA.XMLDOM.DOMDocument;
    DOMNode XML_SCHEMA.XMLDOM.DOMNode;
    DOMNodeItem XML_SCHEMA.XMLDOM.DOMNode;
    DOMNodeList XML_SCHEMA.XMLDOM.DOMNodeList;
    DOMCharacterData XML_SCHEMA.XMLDOM.DOMCharacterData;
    TheDocument CLOB;
    ID VARCHAR2(100);
    Data VARCHAR2(200);
    BEGIN
    -- LOB
    DBMS_LOB.CREATETEMPORARY(TheDocument, TRUE);
    DBMS_LOB.WRITEAPPEND(TheDocument, LENGTH(XML_ResponseCalc), XML_ResponseCalc);
    -- Parse
    Parser := XML_SCHEMA.XMLParser.NewParser;
    XML_SCHEMA.XMLParser.ParseCLOB(Parser, TheDocument);
    DOMDocument := XML_SCHEMA.XMLParser.GetDocument(Parser);
    XML_SCHEMA.XMLParser.FreeParser(Parser);
    -- Node
    DOMNode := XML_SCHEMA.XMLDOM.MakeNode(DOMDocument);
    -- Get ID
    DOMNodeList := XML_SCHEMA.XSLProcessor.SelectNodes
    (DOMNode,'/RSDecEng/ResponseCalc/ID/text()');
    IF XML_SCHEMA.XMLDOM.GetLength(DOMNodeList) > 0 THEN
    DOMNodeItem := XML_SCHEMA.XMLDOM.Item(DOMNodeList, 0);
    XML_SCHEMA.XMLDOM.WriteToBuffer(DOMNodeItem, ID);
    SYS.DBMS_OUTPUT.PUT_LINE ('ID: '||ID);
    END IF;
    -- Get CDATA
    DOMCharacterData := XML_SCHEMA.XMLDOM.MakeCharacterData(DomNode); -- <-- ok here...
    IF NOT XML_SCHEMA.XMLDOM.isNull (DOMCharacterData) THEN -- <-- ...and here
    Data := XML_SCHEMA.XMLDOM.GETDATA(DOMCharacterData); -- <-- ...but here Exception raise
    END IF;
    END;
    I hope you can help me.
    Thank you in advance
    Markus Schwabe

    You need to notice the definitions for makecharacterdata:
    FUNCTION makeCharacterData(n DOMNode) RETURN DOMCharacterData;
    PURPOSE
    Casts given DOMNode to a DOMCharacterData
    It only do the casting.

  • Question on retrieving data from a JTable

    I have created a custom table model by following some examples. I will problably remove this though and just use the default model. I just wanted to find out a couple of things about the code. If the cells update automatically, why is there a setValueAt method? I dont see anywhere in the listener where this method is used.
         public class InteractiveTableModelListener implements TableModelListener {
         public void tableChanged(TableModelEvent evt) {
          if (evt.getType() == TableModelEvent.UPDATE) {
              int column = evt.getColumn();
              int row = evt.getFirstRow();
              System.out.println("row: " + row + " column: " + column);
              table.setColumnSelectionInterval(column + 1, column + 1);
              table.setRowSelectionInterval(row, row);
         }My second question is about retrieving the data. I need to get the data out of the table, create an object from it and send it too my database. This is my getValueAt method
         public Object getValueAt(int row, int column) {
             UpdateEventSetGet record = (UpdateEventSetGet)dataVector.get(row);
             switch (column) {
                 case POSITION_INDEX:
                    return record.getPosition();
                 case FNAME_INDEX:
                    return record.getFirstname();
                 case LNAME_INDEX:
                    return record.getLastname();
                 case TIME_INDEX:
                    return record.getTime();
                 default:
                    return new Object();
         }I just have a couple of questions about this. What is the best way to loop in order to retrieve all of the data from the table, as i presume the above method only retrieves one cell. And secondly, my constructor in my set/get class does not require any parameters (this is how it was for some reason)
         public UpdateEventSetGet() {
         position = "";
         firstName = "";
         lastName = "";
         timeSet = "";
         }The way it is above, can i retrieve four objects (as that what the getValueAt methods returns), pass them into this constructor to end up with just 1 object?
    cheers for the help

    hope this helps
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Vector;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.WindowConstants;
    import javax.swing.table.DefaultTableModel;
    * @author dayananda.bv
    public class TableModelTest extends JFrame implements ActionListener{
        private JButton jButton1;
        private JScrollPane jScrollPane1;
        private JTable jTable2;
        Vector vec = new Vector();
        DefaultTableModel dtm;
        /** Creates a new instance of TableModelTest */
        public TableModelTest() {
            jButton1 = new JButton("Get Data");
            jButton1.addActionListener(this);
            jTable2 = new JTable();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            jButton1.setText("jButton1");
            int j = 0;
            for(int i=0;i<10;i++){
            Vector v = new Vector();
                v.addElement(j++);
                v.addElement(j++);
                v.addElement(j++);
                v.addElement(j++);   
                vec.addElement(v);
            Vector colNames = new Vector();
            colNames.addElement("A");
            colNames.addElement("B");
            colNames.addElement("C");
            colNames.addElement("D");
            dtm = new DefaultTableModel(vec, colNames);
            jTable2.setModel(dtm);
            jScrollPane1 = new JScrollPane(jTable2);
            getContentPane().add(jScrollPane1,BorderLayout.CENTER);
            getContentPane().add(jButton1,BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent e){
            Vector data = dtm.getDataVector();
            for(int i=0;i<data.size();i++){
                Vector row = (Vector)data.get(i);
                System.out.println(row);
        public static void main(String args[]){
            new TableModelTest();
    }

  • Client Socket Problem: retrieving data from my Simple http Server...

    here's the main part of the "sending" of data from my server class:
    write(b.getBytes());
    outtStream.write(version.getBytes());
    outStream.write(replyCode.getBytes());
    here the server sends the data back to the client...i've tested this on a webbrowser and got a correct response...
    now in my client side, I'm having problems...
    1) I dont know how to retrieve the data from the outStreams above...
    2) Can anyone give me some help plz...or descriptive sample code
    here's the main part of the client sending its data first from the user input(client) and then sending the data...(ive created the socket)
    input = new BufferedReader(new InputStreamReader(System.in));
    output = new PrintWriter(socket.getOutputStream(),true);
    while((message = input.readLine()) != null)
    output.println(message);//sends the client's input to server?
    System.out.println(input.readLine());//retrieves server's response
    //then outputs it

    also i tried adding
    input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    after the System.in one and still no luck :[                                                                                                                                                                                                                                                                                               

  • Retrieving data from a JTable

    I have 2 JTables. I want to select all the data of multiple rows in the first JTable and want to add this selected data to the second JTable. Both the JTables use DefaultTableModel. Can u plz help me by telling how to do this?

    Since it is raining here
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class SelectionTable extends JFrame
        public SelectionTable(int numberOfRows, int numberOfColumns)
            super("JTable Selection Test");
            getContentPane().setLayout(new GridLayout(0,1));
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            numberOfRows_ = numberOfRows;
            numberOfColumns_ = numberOfColumns;
            final JTable table = new JTable(new FullTableModel());
            table.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
            getContentPane().add(new JScrollPane(table));
            JTable selectionTable = new JTable(new SelectionTableModel(table));
            getContentPane().add(new JScrollPane(selectionTable));
            getContentPane().setPreferredSize(new Dimension(1024, 480));
            pack();
        private class FullTableModel extends AbstractTableModel
            public int getColumnCount()
                return numberOfColumns_;
            public int getRowCount()
                return numberOfRows_;
            public Object getValueAt(int rowIndex, int columnIndex)
                return "[" + rowIndex + "," + columnIndex + "]";
            public String getColumnName(int column)
                return "Column " + column;
        private class SelectionTableModel extends AbstractTableModel
            SelectionTableModel(JTable parentTable)
                assert parentTable != null;
                parentTable_ = parentTable;
                parentTable_.getSelectionModel().addListSelectionListener(new ListSelectionListener()
                    public void valueChanged(ListSelectionEvent e)
                        if (!e.getValueIsAdjusting())
                            fireTableDataChanged();
            public int getColumnCount()
                return parentTable_.getModel().getColumnCount();
            public int getRowCount()
                return  parentTable_.getSelectedRowCount();
            public Object getValueAt(int rowIndex, int columnIndex)
                return parentTable_.getModel().getValueAt(parentTable_.getSelectedRows()[rowIndex], columnIndex);
            public String getColumnName(int column)
                return parentTable_.getModel().getColumnName(column);
            private JTable parentTable_;
        private int numberOfRows_;
        private int numberOfColumns_;
        public static void main(String[] args)
            new SelectionTable(1000, 10).setVisible(true);
    }

  • Failed to retrieve data from the database.---- Error code:-2147482925

    Hi,
    I am  getting random error while generating a PDF report in Crystal Report XI R2.
    The error details are
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Impossibile r
    Error in File C:\WINDOWS\TEMP\{11834722-3B8E-4DFF-B7B6-B3D52DF904C1}.rpt:
    Failed to retrieve data from the database.---- Error code:-2147482925 Error code
    name:failed
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputControlle
    r.export(Unknown Source)
    at ps_emxCrystalReportUtil_mxJPOZsBymAAAAAEAAAAD.getReport(ps_emxCrystal
    ReportUtil_mxJPOZsBymAAAAAEAAAAD.java:488)
    at ps_emxCrystalReportUtil_mxJPOZsBymAAAAAEAAAAD.ps_storeReportWithoutCh
    eckin(ps_emxCrystalReportUtil_mxJPOZsBymAAAAAEAAAAD.java:183)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    Please help me.
    Thanks in advance
    -Abhi

    Not enough info.
    The exception just states there were problems retrieving data from your data source.
    Sincerely,
    Ted Ueda

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • EVDRE error "encountered problem when retrieving data from webserver"

    Hi,
    in a EVDRE we always get the error "encountered problem when retrieving data from webserver"
    When analysing this further we noticed this is always generated when a base member is selected in the CV and the expansion on the row for this dimension is has one of the following expansion settings:
    DEP
    ALL
    NOEXPAND
    if we select SELF, the error disappears again and the EVDRE works fine again ... is this normal behavior?
    there is no problem with application nor dimension.
    D
    solved it

    Note that the keyword "ALL" does not include the member itself. This may cause some confusion, but as Harish implies, when you select a base member it finds no matches if your memberset is "ALL".
    If you want to design a report to handle the user moving back and forth between base and non-base members in their CV, you either need to include SELF,ALL or SELF,DEP, or something similar....
    OR you need to get a little fancier, and use EVPRO to look and see if the CV member is base -- evpro(app,member,"CALC") -- and then use some conditional logic in Excel to choose the correct expansion options. If Calc=N, use Self, otherwise use SELF,DEP or whatever you choose. This can be a bit tricky if you then want the user to be able to drill down in the report (especially if you want the workbook option to insert add'l rows on the expansion, rather than replace), but it's all possible.

  • Problem while executing app for retrieving data from EXCEL Sheet

    hi
    i have this exception while running my application of retrieving data from a Excel sheet through java application , i had also set theclasspath for jxl. jar file but where its going wrong i dont know heres my code
    import java.util.Date;
    import java.io.*;
    import jxl.*;
    import javax.swing.*;
    import java.awt.*;
    import jxl.read.biff.BiffException;
    public class testExcel2
    public static void main(String args[]) throws jxl.read.biff.BiffException
    try
    File f=new File("move.xls");
    jxl.Workbook workbook=null;
    jxl.Sheet sheet=null;
    workbook=jxl.Workbook.getWorkbook(f);
    sheet=workbook.getSheet(0);
    Cell a1 = sheet.getCell(0,0);
    String stringa1 = a1.getContents();
    System.out.println("stringshaddddddddjk "+stringa1);
    workbook.close();
    }catch(IOException ex){
    System.out.println("Error" + ex);
    catch (BiffException ex2){
    System.out.println("Error" + ex2);
    catch(IndexOutOfBoundsException ex1){
    System.out.println("Error" + ex1);
    compilation is sucees but while running its giving an EXCeption
    MicrosoftXP[Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    G:\mysfw\pgms>java testexcel2
    Exception in thread "main" java.lang.NoClassDefFoundError: testexcel2 (wrong nam
    e: testExcel2)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)

    Java is case sensitive. testexcel2 is different from testExcel2.
    G:\mysfw\pgms>java testexcel2
    Exception in thread "main" java.lang.NoClassDefFoundError: testexcel2 (wrong name: testExcel2)

  • Query Report:To Retrieve Data from A/R Invoice and A/P Invoice

    Hii Experts,
          I am a new Sap B1 Trainee.I am facing a problem when retrieving data from A/R Invoice and A/P Invoice in order to track
    Expenditure and Revenue according to a Bussiness partner,
    I am using union to retrieve the information,but it is saying a error that  Error Converting Varchar to Numeric and also
    i would like to know how can i show the total final payment by reflecting Downpayments in A/R Invoice and A/P Invoice
    With Regards
    Cherry.

    Hii.
    My Sap B1 version is 8.8.1 and patch level is 20. Actully i need a scenario where i can able to show both Expenditure and Revenue of a particular bussiness partner and profit/loss in a single query report.
    I need some tips regarding this,When i am doing union i am getting conversion error converting varchar to numeric when i take
    Sum(Line Total) from OINV and Sum(line total) OPCH group by docdate and docentry and BP .
    and another scenario is how to deduct A/P downpayment or A/R downpayment from A/P invoices and A/R invoice to get the final Revenue and Expenditure ..
    Thanks & Regards
    Cherry

  • Retrieve data from a synonym in oracle database through db connect

    Hi Everyone,
    I have created certain synonym for some tables in oracle. I want to retrieve data from it through db connect but where through source system and then selecting database tables, only tables and views are available.
    Synonyms are not available to create data sources and retrieve the data from it. Why is it so. Is this a limitation of db connect.
    Can anyone please let me know about it.
    Thanks,
    Joshua.

    Hi,
    You want to import data from an external Oracle database into your BW 3.X. To do this, you can connect the external database to the BW 3.X release as a source system using the external database connect. BW 3.X here represents BW 3.0, BW 3.1 and BW 3.5 because in other (DB relevant) parts, all 3 versions are based on the same source code.
    General information
    The above function allows you to load data from an external Oracle database (not a BW database) into your BW 3.0 system.
    There may also be constellations which cannot be used directly through the DB Connect access. However, it should be possible to find an adequate, customer-specific solution for most of these scenarios.
    In such situations, the resulting work falls into the area of Consulting and cannot be handled via Support.
    Successful implementation of a connection requires corresponding expertise and experience in the use of the source database in the areas:
                    - Tools
                    - SQL syntax
                    - DB-specific functions
    Corresponding knowledge of the source application is also required to ensure that semantically relevant data arrives in the BW system.
    Procedure
    You should execute the following steps to connect the source system (Q) to the BW system (BW):
    Installing the client software on an BW application server
                         Of course, you only need to install the client software if you are using BW with a non-Oracle database.
                         Use the Oracle setup program on the database CD (runInstaller on Unix) to start the OracleInstaller. Follow the program instructions and the DB installation instructions to install the Oracle Client software on BW.
    Testing connection setup from BW to Q
                         After you install the client software on BW, try to set up a connection from BW to the server on Q. You may need to adjust the tnsnames.ora or sqlnet.ora files for this, to introduce the Oracle systems (to which contact should be made) to BW. You can test the connection by executing the command "tnsping QDB" on BW to check whether the client has established contact to the QDB database on the Q system.
    Creating a separate U user in Q
                         We recommend that you create a separate U user in Q for connection to BW. This means that authorization and administration questions can be solved centrally.
    Displaying data sources in Q for the U user
                         To provide U data for users other than U, you can create views on other user tables as user U:
                         CREATE OR REPLACE VIEW viewname AS
                           SELECT * FROM QDB.tablename
                         You may have to grant SELECT privileges to user U in the QDB schema:
                            GRANT select ON QDB.tablename TO U
                         Of course, you can also restrict or reformat data in the view arrangement (for example, change from internal date format into the SAP date format). JOIN operations using several tables are also available.
                         !!! Synonyms do not yet work!!!
                         Synonyms that you can create as described below are another option for providing a complete table for the user U:
                           CREATE SYNONYM synoname FOR QDB.tablename
                         !!! Synonyms do not (yet) work!!!
                         After you have displayed the require data for user U, you can simply use
                           SELECT * FROM <view or table>
                         on the Q system to check which data is returned.
                         You can now open a link to Q as user U in the BW system with SQLPLUS and check, using the same SELECT, whether this data is also seen in the Oracle client. If this is not the case, there is probably a connection problem.
    Creating a connection from BW to Q in BW
    Including data sources of user U user in Q in BW.
    Solution
    Supported BW, Basis and BW 3.0B database versions, Basis 6.20 Support Package 2 (or higher)
          Oracle 8.1 (or higher, see below)
    Possible problems
    - Synonyms do not (yet) work!
    Up to now, only tables and views have been used as data sources for the DB Connect from the R3 Basis. As soon as synonyms are also used in the Basis, you will be able to convert created views (or even replicated tables) to synonyms as a workaround.
    With Basis 6.40 at the earliest, therefore as of BW 3.5, you will also be able to use synonyms. Until then, the following will help:
      CREATE VIEW <view_on_synonym> AS SELECT * FROM <synonym>
    - The source DB must have at least the release version of the BW DB.
    Oracle only ensures the support of client-server links if the version of the client is not higher than that of the server. So if BW has Oracle version 8.1 and, as in the case of Dbconnect, is run as a client against the server of the source database, the source database must have at least release Oracle 8.1 or higher.
    Of course, you have the option to install the Oracle client software of a lower version and then use this for the DB connect. This is also the procedure used to work with a DB connect on external databases of other vendors.
    Furthermore, the implementation of the DBconnect function in BW uses SAP Basis functions. Specifications of Oracle 8.1 database catalogs are used here. The source database must therefore have at least Version 8.1.
    - Oracle Client Software Version
    If you want to connect from an Oracle BW DB to an Oracle source DB, for the DB connect you naturally use the client software that you already installed on each application server.
    If you want to connect from a non-Oracle BW DB to an Oracle source DB, check item 3 of note 521230 to see which Oracle client software version is released with your BW R3 kernel and use this version.
    - Date and time fields in Oracle and their conversion into SAP-compatible column formats
    Example with a DATE field:
    Since a SAP table does not have a DATE field (date values are NUMC(8) and time specifications are NUMC(6)), we will use the Oracle DBA_TABLES system table as an example.
        SQL> desc dba_tables;
    The Oracle DBA_TABLES system table has a LAST_ANALYZED field. This is a DATE type field and is recognized as a date field of 7 characters by DBA_CONNECT. However, the import does not work because the DATE is a 7-byte conglomerate of "...century, year, month, date, hour, minute and second." (extract from the Oracle documentation).
    To make this DATE field legible for DB connect, you must use the TO_CHAR function in a VIEW. This should display the following examples:
    SQL> select LAST_ANALYZED from dba_tables
          where table_name like 'RS%' and rownum < 10 ;
    The formatting used here is the default used implicitly by SQLPLUS.
    SQL> select  to_char(LAST_ANALYZED,'YYYYMMDD') as dat from dba_tables where table_name like 'RS%' and rownum < 10 ;
    The result now has the SAP compatible format YYYYMMDD and should be loaded correctly by the DB connect as a date.
    SQL> select  to_char(LAST_ANALYZED,'HH24MISS') as tim from dba_tables where table_name like 'RS%' and rownum < 10 ;
    The result now has the SAP compatible format HHMMSS and should be loaded correctly by the DB connect as a time.
    You can use the following example for more detailed experiments:
    SQL> select  to_char(
           TO_DATE('03-FEB-2001 04:05:06','DD-MON-YYYY HH24:MI:SS'),
           'YY-MM-DD HH24-MI-SS') as datim from dual;
    with the result:
      DATIM
      01-02-03 04-05-06
    When you create a VIEW and use the TO_CHAR function (or other functions), you should easily be able to avoid problems with the interpretation of date/time specifications (and other reformatting).
    Details about the functions and the formats are contained in the Oracle documentation.
    - Special characters
    A words that contain special characters can only be imported correctly if the code pages in BW and in the source system are identical. If the code pages are not the same, DB Connect can be used if the characters to be imported appear under the first 127 characters of the character set.
    The use of multibyte code pages in the source system for saving data using character sets with more than 256 characters (Kanji, Katakana, Hiragana, Korean, Chinese, Tagalog, Khmer, Arabic, Cherokee, and so on) can cause the characters to become corrupt.
    For questions concerning the code pages, also refer to the FAQ note 606359 and question/answer 19 that appears there.

  • Retrieve data from a large table from ORACLE 10g

    I am working with a Microsoft Visual Studio Project that requires to retrieve data from a large table from Oracle 10g database and export the data into the hard drive.
    The problem here is that I am not able to connect to the database directly because of license issue but I can use a third party API to retrieve data from the database. This API has sufficient previllege/license permission on to the database to perform retrieval of data. So, I am not able to use DTS/SSIS or other tool to import data from the database directly connecting to it.
    Here my approach is...first retrieve the data using the API into a .net DataTable and then dump the records from it into the hard drive in a specific format (might be in Excel file/ another SQL server database).
    When I try to retrieve the data from a large table having over 13 lacs records (3-4 GB) in a data table using the visual studio project, I get an Out of memory exception.
    But is there any better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?
    Any help on this problem will be highly appriciated.
    Thanks in advance...
    -Jahedur Rahman
    Edited by: Jahedur on May 16, 2010 11:42 PM

    Girish...Thanks for your reply...But I am sorry for the confusions. Let me explain that...
    1."export the data into another media into the hard drive."
    What does it mean by this line i.e. another media into hard drive???
    ANS: Sorry...I just want to write the data in a file or in a table in SQL server database.
    2."I am not able to connect to the database directly because of license issue"
    huh?? I never heard this question that a user is not able to connect the db because of license. What error / message you are getting?
    ANS: My company uses a 3rd party application that uses ORACLE 10g. And my compnay is licensed to use the 3rd party application (APP+Database is a package) and did not purchased ORACLE license to use directly. So I will not connect to the database directly.
    3.I am not sure which API is you are talking about, but i am running an application of the visual studio data grid or similar kind of controls; in which i can select (select query) as many rows as i needed; no issue.
    ANS: This API is provided by the 3rd party application vendor. I can pass a query to it and it returns a datatable.
    4."better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?"
    ANS: As I get a system error (out of memory) when I select all rows in a datatable at a time, I wanted to retrieve the data in multiple phases.
    E.g: 1 to 20,000 records in 1st phase
    20,001 to 40,000 records in 2nd phase
    40,001 to ...... records in 3nd phase
    and so on...
    Please let me know if this does not clarify your confusions... :)
    Thanks...
    -Jahedur Rahman
    Edited by: user13114507 on May 12, 2010 11:28 PM

  • Unable to retrieve data from a Associative Array (?)

    Hi!!!! :)))
    i've a problem!!!
    this is the oracle's code:
    Package GEST_REPORT
    IS
    type rec_url is record(
    TIBCDCON TBISD_30.TIBCDCON%TYPE,
    etc...
    SETDEL VARCHAR2(10)
    type tab2 is table of rec_url index by binary_integer;
    FUNCTION MAIN_SELECT
    ( CPLAS IN VARCHAR2)
    RETURN tab2;
    END;
    ...and a java code:
    String storedProcedure = "{? = call GEST_REPORT.MAIN_SELECT(?)}";
    String result = "";
    try{
    if (connection != null) {
    CallableStatement callableStatement = null;
    callableStatement = preprepareCall(storedProcedure);
    // preparo parametri di input.
    callableStatement.setString(2, "OM");
    callableStatement.registerOutParameter(1, oracle.jdbc.driver.OracleTypes.ARRAY, "tab2");
    and so on...
    In the last line of code throws an 'invalid name pattern'
    or
    "ORA-21700: object does not exist or is marked for delete"
    if registerOutParameter(1, oracle.jdbc.driver.OracleTypes.ARRAY, "ISDSV.GEST_REPORT").
    Where TAB2: IS THE MY ARRAY (OR NESTED TABLE?);
    GEST_REPORT: THE NAME OF PACKAGE;
    ISDSV: THE USER.
    do u have suggestion for retrieve data from TAB2 in JAVA??
    THKS!!!!!!

    Hi
    Use fully qualified type name: schema_name.type_name. For your case that would be "ISDSV.tab2"
    Cherrs :))

Maybe you are looking for