Failed to retrive data from database

Hi.
I have a layut in Crystal.
This report uses 2 views. PrintOinvHeader and PrintInv1Lines
when i use fields from first view everything is ok.
When i add line form view 2'nd to the report i have this error and next one
Canot detremine the queries necessary to get data from this report

Hi. there are those scripts
USE [BAZA2]
GO
/****** Object:  View [dbo].[PrintInv1Lines]    Script Date: 04/05/2011 14:50:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[PrintInv1Lines]
AS
SELECT     t0.DocEntry, t0.ItemCode, t0.Dscription, t0.Price, t0.PriceBefDi, t0.PriceAfVAT, t0.DiscPrcnt, t0.LineTotal, t0.LineVat, t0.Currency, t0.VatSumFrgn, t0.LineVatlF,
                      t0.VatGroup, t0.VatPrcnt, t0.unitMsr
FROM         dbo.INV1 AS t0 INNER JOIN
                      dbo.OITM AS t1 ON t1.ItemCode = t0.ItemCode
WHERE     (t0.DocEntry = 4500)
USE [BAZA2]
GO
/****** Object:  View [dbo].[PrintOinvHeader]    Script Date: 04/05/2011 14:50:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[PrintOinvHeader]
AS
SELECT     t0.DocEntry, t0.DocNum, t0.DocDate, t0.TaxDate, t0.DocDueDate, t1.CardCode, t1.CardName, t2.PymntGroup, t0.ObjType, t0.Address, t1.LicTradNum
FROM         dbo.OINV AS t0 INNER JOIN
                      dbo.OCRD AS t1 ON t1.CardCode = t0.CardCode INNER JOIN
                      dbo.OCTG AS t2 ON t2.GroupNum = t0.GroupNum
WHERE     (t0.DocEntry = 4500)

Similar Messages

  • Failed to retrive data from database Error

    Hi,
    I am working on Crystal report XI R2.0. Back end is Oracle and I am migrating the oracle database to MySQL database. After migrating the DB from oracle to MySQL, saved and closed the report. If I open the same reprt I am getting the following error.
    "Failed to retrive the data from database.Details:3D000.[MySQL][ODBC 5.1 Driver][mysqld-5.1.24-rc-community][No database selected]"
    Please let me know how to resolve this issue.
    Thanks,
    Udaya

    Hi Kalva,
                  Please can you let us know the version of MySql to which you have migrated the database? Are you able to create a new report with the help of the migrated database?
    You can try changing the connection type to ODBC, OLEDB etc.Also,you can use the 'Set Datasource Location' in the 'Database Expert' to make the report point to the correct database.
    Thanks,
    Alok.

  • Error:Failed to retrieve data from database [Vendor Code:3001]

    Hello FOlks am trying to run a crystal report but when i try to run it somehow returns this error i.e [Error:Failed to retrieve data from database [Vendor Code:3001], I have no clue wats happening with this.Can anybody please throw some light on this.Am providing the sql behind this report for reference.
    SELECT "CLIENT"."CLIENT_NAME",
            "RECOVERY"."AMOUNT",
            "RECOVERY"."RECOVERY_TRANSACTION_INTERNAL",
            "RECOVERY"."ALLOCATION_CHECK_AMOUNT",
            "RECOVERY"."RECOVERY_DATE"
       FROM "HRI1_OWNER"."CLIENT""CLIENT",
            "HRI1_OWNER"."EVENT_CASE""EVENT_CASE",
            "HRI1_OWNER"."SETTLEMENT""SETTLEMENT",
            "HRI1_OWNER"."RECOVERY""RECOVERY"
      WHERE "CLIENT"."CLIENT_ID" = "EVENT_CASE"."CLIENT_ID"
        AND "EVENT_CASE"."EVENT_CASE_ID" = "SETTLEMENT"."EVENT_CASE_ID"
        AND "SETTLEMENT"."SETTLEMENT_ID" = "RECOVERY"."SETTLEMENT_ID"
        AND "CLIENT"."CLIENT_CODE" <> 'CLIENT  1'
        AND "CLIENT"."MAJOR_CLIENT_ID" in
            (Select major_client_id
               from major_client
              where major_client_code in ('LA', 'PFG'))
      ORDER BY "CLIENT"."CLIENT_NAME"Edited by: user11961230 on Nov 12, 2009 6:57 AM

    @oradba:Hi Thanks for getting bak. Well i have ran the query using PL/SQL Developer tool and yes its mapping to ORA-03001:unimplemented feature. i dont know what the problem is.
    @centinul: well i dont have any views in there.but still cudnt figure out why its throwing tht error
    Thanks
    Edited by: user11961230 on Nov 12, 2009 7:12 AM

  • How to retrive data  from  database views or projection views

    how to retrive data  from  database views or projection views

    Hi chintam,
    1. Very simple
    2. Just like normal select statement.
    3. Select * from VIEWNAME.
    4. (Instead of the tablename, we just have to give the viewname)
    regards,
    amit m.

  • Failed to retrieve data from database?

    I am a new user
    When I try to Preview a document I am prompted to enter in database information.
    I have tried a few times to connect to my server and
    continuously keep getting the same error page
    No matter what I enter in the two fields, this is what pops up.
    "Failed to retrieve data from database"
    " Details: ADO Error Code:0x
    Source: Microsoft OLE DB Provider SQL server
    Description: Invalid object name: ScratchWO.dbo.tblsyslistviewprint'.
    SQL State:42502
    Code:208"
    When the OLE DB(ADO) page opens and asks for a server and a database, what is needed to stop the error from happening
    If anyone has any information that would be great !

    SQL State:42502 means an user authorization error.  Check the user and it's access to the target database.

  • Failed to retrieve data from database - DataDirect Paradox

    Crystal Reports 12.1.0.892
    Windows XP SP3
    DataDirect ODBC Driver for Paradox 5.30.00.23
    Paradox 5 database
    When I run the following query against two tables:
    SELECT `Ticket1a`.`PatronID`, `PHONELIN`.`PhoneNumber`
    FROM   `PHONELIN` `PHONELIN` INNER JOIN `Ticket1a` `Ticket1a` ON `PHONELIN`.`PatronID`=`Ticket1a`.`PatronID`
    I get the following error:
    Failed to retrieve data from the database
    Details: 42000: DataDirect ODBC Paradox driver    Extra characters at end of query:  INNER.  Database VendorCode: 3902
    The SQL tracing log can be found at http://188.grandtheater.org/sql.log
    Can anyone tell me what is going on here and how I can get around it?
    TIA

    I tried the Add Command option and entered the SQL query as follows:
    select ticket1a.patronid, phonelin.phonenumber
    from ticket1a ticket1a inner join phonelin phonelin on ticket1a.patronid=phonelin.patronid
    and still got the same error as before.  Using the following SQL query:
    select ticket1a.patronid, phonelin.phonenumber
    from ticket1a, phonelin
    where ticket1a.patronid = phonelin.patronid
    I was able to get results using the DataDirect driver.
    If I use the Microsoft Paradox driver (which is very slow.  15 minutes to run this query) and use the following SQL query:
    select ticket1a.patronid, phonelin.phonenumber
    from ticket1a ticket1a inner join phonelin phonelin on ticket1a.patronid=phonelin.patronid
    I will not get the error and I will get results.
    Any reasons why the DataDirect driver is producing errors?

  • Retriving data from database using JDBC and mysql.

    st=con.createStatement();
    st.executeUpdate("INSERT INTO temperature(`temp`) VALUES ('"+name+"')"); ResultSet rs = st.executeQuery("Select * from temperature");
    String s1="";
    while(rs.next())
    s1= rs.getString(1);
    document.write(s1+"-----------------------------");
    }when i am retriving data from data base i am getting data which i inserted before.how to display present inserted data? i heard we should use scrollable.can any one how to do this.
    Date&time: Thu Feb 28 18:41:40 PST 2008 -----------------------------NANDA----------------------------
    [[email protected]----1name=2name=3name=4name=5name=6-----------------------------
    1123456-----------------------------123456-----------------------------1,2,3,4,5,20-----------------------------

    Hi,
    st=con.createStatement();
    st.executeUpdate("INSERT INTO temperature(`temp`) VALUES ('"+name+"')");
    //Changes in the query
    ResultSet rs = st.executeQuery("Select * from temperature where temp ='"+name+"' ");
    String s1="";
    while(rs.next())
    s1= rs.getString(1);
    document.write(s1+"-----------------------------");
    //Select * from temperature where temp ='"+name+"'
    The above query which results the last updated information

  • Retriving data from database through EntityBean to WebDynpro

    Dear SDN's,
    I have integrated my EJB appliaction into WebDynpro via Data Access Command Bean.
    Here is my scenario.
    1.Created a Dictionary Project,
    2.Created a EntityBean,
    In Entity Bean, i have created a finder method using the query - FindByAllAccounts
    used the EJB QL to retrieve the records from the database using the following syntax in EntityBean.
    <b><query>
         <query-method>
                 <method-name>findByAllAccounts</method-name>
                <method-params/>
       </query-method>
       <ejb-ql>select object(s) from ServiceTypeBean s</ejb-ql>
    </query></b>
    3.In Session bean, the viewAllServiceTypes method which will be invoked from within the Command Bean is called the entity bean of the local home, findByAllAccount
    Command Bean invoked the session bean, viewAllServiceTypes. It returns the resultSet dataType
    In Web Dynpro, add the code shown below in the QueryAll button and also, the EAR file is added to the Web Dynpro as a sharing reference
    After the execution of my WebDynpro,
    it returns no records. It should return 2 records. I dont know where it goes wrong.
    Correct me if anything is worng here.
    Here what my doubt is, the return of the Entity bean and Session Bean is Collection type.
    If i store the retrieved records in collection Object like vector, how can i differentiate each record to display as individual.
    anyway I tried by converting the Collection Object to ResultSet.
    Here is the code in the command Bean,
    public ResultSet execute1()
    Collection col=new Vector();
    ResultSet rs=null;
    try{
    col=theSrType.viewAllServiceTypes();
    rs=(ResultSet) col.iterator();
    }catch(Exception e){
    e.printStackTrace();
    return rs;
    I am just calling the execute1() method in my Webdynpro program.
    I know here something is wrong but my aim is to retireve set of records from database via Entity bean to display in WebDynpro Table.
    Your help will be appreciated.
    Regards,
    Sireesha.B

    For helper class you have to create a separate java project.
    Auxillary class is required to store the data from the entity bean  in a form that can be displayed.
    For this purpose, the auxillary class must contain a field for each relevant value. The fields will be named similar to their definition in the entity bean.
    For example:Entity Bean has persistent fields id, firstname, lastname.
    Auxillary Class should contain all these fields and getter and setter method to access these fields.
    In your EJB module project give this auxillary class project reference.
    In the session bean parse the collection of Entitty Bean local references and convert it to collection of auxillary class reference.
    In the command bean  declare a collection type variable,  write getter and setter methods for this variable, call the session bean method and assign it declared collection type variable.You dont need to write any logic inside command bean method.
    Go through this URL for more information.
    <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/70/13353094af154a91cbe982d7dd0118/frameset.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/70/13353094af154a91cbe982d7dd0118/frameset.htm</a>
    Message was edited by:
            Monalisa Biswal

  • How save & retrive data from database using flex, coldfusion, sql server

    hi , i am very new in flex, i am trying to insert data in
    database using flex2, coldfusion, sql server. any one can help me
    please. or give me any example.

    Hi try to goto the following sites, you will get some
    direction to think
    http://weblogs.macromedia.com/pent/archives/2006/11/example_of_flex.cfm
    http://pdxphp.org/node/258
    Good Luck

  • Retriving data from database

    i want to match the value in request.getParameter("sort") to retrive my databse infromation. i did it like dat :
    rs = st.executeQuery("select * from cust_info where Acc_Name LIKE ''"+request.getParameter("sort")+"'%'");
    but tis doesnt seem to work. can anyone tell me the proper syntax?

    An alternative approach may help - use a PreparedStatement and then set the values using the PreparedStatement.set<type>(...) method.
    e.g.
    String sqlQuery = "select * from cust_info where Acc_Name LIKE ?";
    psQuery = conn.prepareStatement(sqlQuery);
    psQuery.setString(1, request.getParameter("sort") + "%");
    rs = psQuery.executeQuery();
    rs.next();
    // Process resultset here.The ?'s indicate a parameter that you are setting, all of the formatting is done for you so never use '?' just put ? and ensure the right method is used for the type of parameter.
    Remember to close the PreparedStatement and ResultSet after you have finished (in a finally clause is probably best) to avoid leaking cursors on the Database.

  • Retriving data from database on selecting particular value in the combo box

    Hi,
    On selecting the particular value from the combo box, the corresponding value of the other segement fields should be retrived from databse and displayed in the text box

    Babel,
    If you don't have a query bdoc and the business query that joins both 2 tables already, then please crate one.
    After that, write this code on the change of the combobox.
    You would have to change the names below for the Query, properties, anchor, parameters, controls.
    ===================================
    Private Sub ctrlBankNameCombo_onValueChanged2(ByRef boundAttributeChanged As Boolean)
    On Error Resume Next
    Dim objBankQuery As BusinessQuery
    Dim ObjBankCol As BusinessCollection
    Dim strID As String
    If Not boundAttributeChanged Then Exit Sub
    strID = ""
    strID = myanchor.bo.getAttribute("BankNameComboProperty") ' Bank ID
    If strID <> "" Then
        Set objBankQuery = gServices.factory.newBusinessQuery("MyNewQuery")
        objBankQuery.Mandt = "000"
        objBankQuery.BANKID = strID
        Set ObjBankCol = objBankQuery.query 
           If Not ObjBankCol Is Nothing Then  
               ctrlBankAddress.Value = ObjBankCol.getAttribute(1, "BankAddress")
               ctrlBankPhone.Value = ObjBankCol.getAttribute(1, "BankPhone")
           End If
    End If
    ===================================
    Regards,
    Vadim.

  • Crystal Reports 2008 failed to retrive data, and instead deleted it.

    I have been using crystal reports 2008 for the past year or so with our billing software through an OBDC data source. I was using xp pro sp3. However I recently upgraded to a new computer running xp pro sp3 as well, and now I am having some serious issues.
    When I try to connect to a data source in the database expert, it shows all the tables, and then the field explorer shows the fields, but when I actually try to brows the data, view a preview, verify the database, or refresh an old report it gives me an error and DELETES the .dat file that the field was located in. I am so glad I have regular backups to restore too, because pulling a report nuked 5 .dat files.
    The errors I am getting are as follows:
    "Failed to retrieve data from database."
    Clicked ok
    "Failed to retrieve data from database."
    Clicked ok
    "Database Connector Error: 'HY000:[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface][Data Record Manager]The file cannot be created with Variable-trail Allocation Tables (VATs)(Btrieve Error 105)'"
    Clicked ok
    "Failed to retrieve  data from database.
    Details:HY000:[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]Unable to open table: <nameoftable>"
    Click ok
    and Crystal stays open but has just deleted the .dat file that the table was located in. It will still show the fields but  no data. Trying to open the other software leads to an error "missing <name of table>.dat" It then has to be restored from a backup.
    I have tried updating crystal as well as fully uninstalling it and reinstalling it, we have created a new ODBC connection, and cloned the database for testing purposes. The same thing occurs with the new database and ODBC data source.
    We have no other computers, except my old one that has crystal reports on it. I have tried the old computer again and it is working fine.
    Does anyone have an suggestions? This is pretty critical. Thanks in advance.
    Edited by: Russellk on Jan 13, 2010 8:27 PM

    Hello, you could try turning on ODBC tracing to see if it logs anything. It's a pain to get going but here's how.
    Go to ODBC Admin, Click on the Tracing tab and create a log file and save. Don't start tracing yet. Close the ODBC admin and then re-open it and then turn tracing on. You may have to do this a few times to get it working.
    Once it's tracing then open CR and try the demo data. Then close the report, log off, log onto the real data and do the same with a new report. You'll see a bunch of ODBC API's but there may be one or 2 that don't look right or errors may be logged compared to the DEMODATA.
    Another suggestion is it may not be your PC doing the deleting. Maybe the Server thinks you have infected the data files and it's deleting them. Have a look in anti-virus quarantine logs on the server to see if it's doing the nasty....
    Check the trust between your PC and the server.
    I've also seen this type of odd behaviour with corrupted Profiles. Check with your IT guys on creating a new one for you, it's apain because you loose everything on your work station.
    What happens if you log on from another PC using your account? Does that also delete the files? Or get someone else who it does work for log into your PC, does that work? If so it may be your Profile is either not trusted or it's been corrupted.
    Good luck
    Don

  • Database.LoadDataSet() method throwing error while retriving data from IBM DB2 database

    Database.LoadDataSet() method is throwing error during retriving data from empty table of IBM DB2 database. It is giving error code "SQL0100W".
    “Error Message: 0NO_DATA [02000] [IBM] [DB2 / NT] SQL0100W FETCH, whether there is a line to be UPDATE or DELETE, or of the query result is an empty table .
    SQLSTATE = 02000”

    Hello SharayuPandit,
    For issues regarding DB2, i suggest that you could post it to DB2 related forum:
    https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000842
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Crystal Reports - Failed to retrieve data from the database

    Hi There,
    I'm hoping that somebody can help me.
    I've developed a crystal report from a stored procedure which I wrote. I can execute the stored procedure within SQL Server and within the Crystal Reports designer without any errors. Furthermore, I have imported the report into sap and can run it within SAP from the server without any errors. SAP version 8.81 PL5
    The issue is that when it's run from a client machine, I get the following error: "Failed to retrieve data from the database. Details: Database Vendor Code: 156. Error in the File RCR10010 {tempfile location}
    Here's a list of things which I have tried, all to no avail:
    - Checked user permissions to ensure that they have proper authorizations
    - Re-set the datasource connection and re-imported the report to SAP.
    - Exported the report and reviewed the datasource connection and re-imported to SAP.
    - Tried to run the report on multiple machines to ensure that it's not machine specific
    - Tried to run the report using different users to ensure it's not user specific.
    - Tested other reports built from stored procedures on client machines to ensure that they work.
    Any assistance in this would be GREATLY appreciated.
    Thank you

    After further testing, we found that the report could be run within SAP on any work station which had the CR designer installed on it.
    As it turns out, the procedure which I wrote has temp tables in it.  The runtimes built into the SAP client install do not support creating temp tables when executing the report from within SAP.  Which is why the report could not retreive data.
    To work around this, I installed external runtimes which were the same version of the Crystal Report and now the report can be run within SAP from any workstation which has the external runtimes (and not just the runtimes within the SAP client).
    I hope this makes sense.

  • Failed to retrieve data from the database crystal reports 2008 in SAP  B1

    Hello friends,
                 I am using Crystal report 2008 with SAP B1 PL 8.8. When I run any report,  it runs correctly from Crystal Report. But whenever I try to open the same report through SAP ( Tools -> Preview External Crystal Report ), it prompts the parameters for that report and then open up the crystal report window and throws an Error message ("failed to retrieve data from the database. Details [Database Vendor Code: 156]").
               Please any one suggest me the corrective solution.
    Thanks in Advance,
    Keyur Raval.

    I had the same problem in SAP B1 2007. Report worked fine except when it was open from B1. Generally there may be different problems. In my case the same problem was caused by using some procedure which was in a specific schema. Changing the schema into "dbo" solved the problem.
    Radoslaw Blaniarz

Maybe you are looking for

  • I've changed my computer, how do i get all my music and films back?

    This is actually knid of annoying as I payed for the films and tv series. The music was from cd's, but still annoying. Any help on getting it from my iPhone back onto the computer would be exellent, especialy if it has nothing complicated to do. Than

  • QUERY taking longer time than usual

    Hello Gurus, The query below used to take 5-10 minutes depending on the resource availability, but this time it is taking 4-5 hrs to complete this transaction. INSERT /*+ APPEND */ INTO TAG_STAGING SELECT /*+ INDEX(A,ALL_tags_INDX1) */ DISTINCT TRIM

  • Trying to install Muse, which brought up installing Adobe Air problems

    Cant uninstall earlier version.   1.1.0.5790 Get this error trying to uninstall: "An error occurred while uninstalling Adobe AIR.  Uninstallation may not be allowed by your administrator. Please contact your administrator." Get this error trying to i

  • Firefox keeps crashing on me every day at least two or three and it is very slow - what can I do to stop this??

    When I turn on my laptop computer to use it, it crashes on me every day at least two or three times before I can use it. Also, it is very slow such as when I want to scroll down my e-mail list. It stops and shows "loading" for a long period of time s

  • Wireless network printer how?

    There are six computers, five of which are laptops, in this house, only one of which is an Apple, mine. All of the other computers are connected via a wireless peer-to-peer network to a desktop PC (read: mini server), through which we run the printer