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();
}

Similar Messages

  • 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()

  • Question about retrieving data from two tables

    Hi everyone.
    I've been working on this and was wondering what the correct way of handling this would be.
    I have two tables, a Billing Table that contains invoices and related information, and a Payments Table that contains payments and related information to that.
    Both tables contain a Date Column for the date that the Invoice was generated or the Payment was made.
    I want to get a list of all Invoices and the respective payments if the invoice was generated between two dates OR the payment was made between these two dates.
    I can get a list of the invoices and their payments if the invoice was generated between those dates.  I can get a list of the payments if they were made between those dates.  But I can't seem to figure out how to do both.
    How do I Join two tables and have it return the data from both tables if either meets the required Date Period?
    Here is the SQL that I have so far.  This SQL returns all of the Invoices and Payments IF the Invoice was generated between these two dates (Or updated). 
    SELECT Billing.ID AS [BID], Billing.AttachmentName, Billing.BillingType, Billing.Invoice, Billing.Description, Billing.Amount, Billing.DateCreated AS [BillingDate],
    Payments.ID AS [PID], Payments.Type AS PaymentType, Payments.Payment, Payments.PaymentNote, Payments.Reason AS [BillReason], Payments.DateCreated AS [PaymentDate],
    Customers.ID AS [CID], COALESCE(NULLIF(Customers.Company,'') + ' - ','') + Customers.LName + ', ' + Customers.FName AS [Name],
    Jobs.ID AS [JID], Jobs.JobType, Jobs.JobStatus, Jobs.JobStatusDate
    FROM Billing LEFT OUTER JOIN Payments ON Payments.BillingID = Billing.ID
    RIGHT OUTER JOIN Customers ON Customers.ID = Billing.CustomerID
    RIGHT OUTER JOIN Jobs ON Jobs.ID = Billing.JobID
    WHERE
    Billing.BillingType = 'Invoice' AND Billing.PaidInFull = 'No' AND Billing.Collections = 'No' AND Billing.ChargeOff = 'No' AND Billing.Lien = 'No' AND Billing.InvoiceCanceled = 'No'
    AND (Billing.DateCreated >= '1/1/2014' AND Billing.DateCreated <= '8/13/14') OR (Billing.DateUpdated >= '1/1/14' AND Billing.DateUpdated <= '8/13/14')
    ORDER BY Name Asc, Billing.Invoice, PID
    Thanks for your help, I really appreciate it.
    -Matt-

    I don't quite follow your query, but your description leads me to think that you need the set of Billing IDs for bills that were created as defined or that have payments that were created as defined.  From that set of IDs you then simply want all Bills
    and their associated payments.  So how do you get that set of IDS?  One way is the union operator: 
    with allbill (billID) as (
    select ID from dbo.Billings where DateCreated between ...
    union 
    select BillingID from dbo.Payments where DateCreated between ... )
    select ...
    from allbill inner join dbo.Billings as bill on allbill.billID = bill.ID inner join dbo.Payments as pay 
    on bill.ID = pay.BillingID 
    order by ... ;
    Your description leads me to believe that you query is much more complicated, but the basic idea is the union in the CTE - generate one combined set of bill IDs that identify all your bills of interest.  Note that I assumed that a payment cannot exist
    with an associated billing.  

  • 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);
    }

  • Error while trying to retrieve data from BW BEx query

    The following error is coming while trying to retrieve data from BW BEx query (on ODS) when the Characters are more than 50.
    In BEx report there is a limitation but is it also a limitation in Webi report.
    Is there any other solution for this scenario where it is possible to retrieve more than 50 Characters?
    A database error occured. The database error text is: The MDX query SELECT  { [Measures].[3OD1RJNV2ZXI7XOC4CY9VXLZI], [Measures].[3P71KBWTVNGY9JTZP9FTP6RZ4], [Measures].[3OEAEUW2WTYJRE2TOD6IOFJF4] }  ON COLUMNS , NON EMPTY CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( [ZHOST_ID2].[LEVEL01].MEMBERS, [ZHOST_ID3].[LEVEL01].MEMBERS ), [ZHOST_ID1].[LEVEL01].MEMBERS ), [ZREVENDDT__0CALDAY].[LEVEL01].MEMBERS ) ........................................................ failed to execute with the error Invalid MDX command with UNSUPPORTED: > 50 CHARACT.. (WIS 10901)

    Hi,
    That warning / error message will be coming from the MDX interface on the BW server.  It does not originate from BOBJ.
    This question would be better asked to support component BW-BEX-OT-MDX
    Similar discussion can be found using search: Limitation of Number of Objects used in Webi with SAP BW Universe as Source
    Regards,
    Henry

  • 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

  • How to retrieve data from a MSSQL?

    Dear All,
    How can I retrieve data from a MSSQL server in my custom iView which is developed by Eclipse?
    Thanks
    Sam

    Hi Sam,
    you have a bunch of possibilities... (and they do not really differ from accessing a DB from within any J2EE app).
    You can use a direct connection, setting Database, port, user, ... within your component.
    Or you can set all these things within VisualAdmin and then reference the DataSource via JNDI from within your component.
    You can directly use SQL.
    Or you can use ObjectRelationalMappers like Hibernate...
    Any more questions?
    Hope it helps
    Detlev

  • Error :Unable to retrieve data from iHTML servlet for Request2 request

    I open bqyfile to use HTML in workspace.
    When I export report to excel in IR report.
    Then I press "back" button I get error"Unable to retrieve data from iHTML servlet for Request2 request "
    And I can not open any bqyfiles in workspace.
    Anybody gat the same question? Thanks~

    Hi,
    This link will be helpful, the changes is made in the TCP/IP parameter in the registry editor of Windwos machine. I tried the 32 bit setting for my 64 bit machine (DWORD..) and it worked fine for me..
    http://timtows-hyperion-blog.blogspot.com/2007/12/essbase-api-error-fix-geeky.html
    Hope this helps..

  • How to retrieve data from virtual infotype?

    Hi.
    I'm trying to write an ABAP program that's retrieving data from infotype 2501.
    If i'm looking at this table PA2501 from SE16, i can see that it's empty, but...
    I have an HR program that's using the PNP and i can see in debbuging mode allot of data over there.
    So, my question is: how can i get this data with a simple SELECT command? where is the data?
    Thanks!
    Barak.

    There may be no data physically stored in table PA2501, it may reside in other tables but programatically pulled by the infotype into internal tables. Surender has given a good example, there are many more examples like some fields are stored in another table. Like for infotype 105, some fields are stored in PA0105 and some are stored in PA0106 which are pulled and displayed on one infotype screen i.e. 105 and hence we do not have a screen for 106. It may be same situation.
    If you have to have a SELECT access, then only way is to debug the code and see how it is pulling the data, which tables etc.

  • Failed to retrieve data from the database.DB Vendor Code 156

    Hi,
    We recently migrated our scheduled Crystal Reports from BO XI R2 platform to BO XI 3.1, and are having issues with select reports that pull from the same SQL database.  The tables and fields exist in the database - and I ran the SQL in a different tool and the syntax is correct.  When I try to run an on-demand or schedule one of these reports in 3.1 Infoview I receive the following error:
    Failed to retrieve data from the database. Details: [Database Vendor Code: 156 ]
    Running:
    CR 2008 SP2
    BO XI 3.1 SP2 (FP 2.7)
    Please advise!  Thanks!

    Hi LuAnn,
    Not really clear what he said but I believe this is correct. The BOE servers are typically running under the local System Account. So when it passed the report job from the BOE Server it is the Local System account that the database is getting. We only do single hop for security. Which means if you are logged into InfoView under your local domain account and try to run a report BOE will not, unless specified in the custom database connection options in the CMC, pass your credentials to the DB but will pass the local system account credentials which is likely why these reports are failing.
    As A TEST only Ask your Administrator to set up a user account in MS SQL Server that has rights to run all reports. Or when you create the report check on the option to use Trusted Authentication. Then when the reports are published to BOE your log on credentials should get passed to the DB server through BOE.
    You'll have to more testing to find a Use account that you can run BOE Servers under and still maintain DB security and report level security that works for you. I also suggest you post your security questions to the BOE Administrator forum to get help configuring all of this and what others are doing.
    Thank you
    Don

  • Failed to retrieve data from the database Database Vendor Code: 2812

    Hi everyone
    Im using Sap Business One Version 2007A SP00 PL49, SQL 2005 and Crystal Reports Basic for Sap Business One (Add on 2.0.0.7). Whenever i try to generate a report from SBO the system displays the following message "Failed to retrieve data from the database DETAILS: [Database Vendor Code: 2812]"
    The scenario is that, according to the Colombia's product local expert, Is not possible to create Stored Procedures, Views, Functions or anything in the customer productive database, in order to improve the performance of the query i created other DB where i created an stored procedure, after that, i called it from Crystal where it's working ok. But when i try to generate it from SBO it show the message promted.
    Someone knows what could be happening
    I'll be thankful

    Hi Cesar,
    Please post your question to the Business One forum.
    I can't move this thread.
    Thank you
    Don

  • Crstal Reports: "Failed to retrieve data from the database"

    Running a report in crystal report from SAP 8.81 using the following parameters: CardCode, GroupCode, Date gives the following error: "Failed to retrieve data from the database" "Conversion failed when to converting the nvarchar value to data type int 12/31/2005 [Database vendor code: 245] ".
    The store procedure in SQL Server executes smoothly and  If you run the report with the date = 12/31/2005 in the parameter also returns expected results.
    Thanks.

    Hello,
    Is this in Business One? If so CR is an OEM build and that forum/product supports that version.
    Please post your question to: http://forums.sdn.sap.com/index.jspa#44
    It could simply be you need to use a formula to convert the field. Click on the Formula Editor and the hit the F1 key and search on "date". Lots of info on how to convert todate and from date tostring...
    Thank you
    Don

  • Failed to retrieve data from the database. [Database Vendor Code: 116]

    My report is using Java Bean class as datasource and the Java Bean class calls a report-specific Java program to return a result set.
    Report fails to generate and the error message is
    Failed to retrieve data from the database. Details:  [Database Vendor Code: 116 ]
    Can anyone tell me what error code 116 means?
    Thanks.

    The problem is solved internally. Our team implemented a result set data structure that incorrectly converts a Double into a String before passing it to Crystal Report for rendering. Data Vendor Code I met yesterday was the outcome of illegal class conversion.
    I have a side question;  our development team would like to use log4j to log method calls invoked during rendering. Our problem could be solved earlier if we knew getString() was invoked instead of getDouble() during rendering.  We thought of specifying the full path of log4j jar file in CRConfig.xml but we don't know how to configure CR to write logging information into a specific file location.
    Please help.
    Thanks

  • Retrieve data from old broken harddrive

    Hi, I want to ask.
    Last friday, my harddrive has broken for unknown reason. I knew it has broken from information I got in PC Hardware Diagnostics UEFI. The harddrive failed on Extensive Test and Long DST test (Error code : Q8FETV-77C7GA-MPFX0J-61DJ03). I plan to buy a new harddrive.
    My question is, can I retrieve my data from the broken harddrive ? I didn't have backups for the data. If it is still possible, what are the steps ? Can I do it by myself or should I get some help from computer service shop to help me ?
    Thank you.

    Hi,
    Double post, pleae use:
        http://h30434.www3.hp.com/t5/Notebook-Hardware/Retrieve-data-from-broken-harddrive/m-p/4827112
    Thanks.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

Maybe you are looking for