21 Replies Latest reply: May 1, 2014 11:42 AM by Sunil Chauhan RSS

    OLEDB read failed

      Hi Folks,

      I have an oracle query that runs fine in TOAD but when I try to run it in Qlikview I get the error "OLEDB read failed". The connection string is fine as I can run other queries against in the same application. Has anyone seen this error before and if so did you find a solution.

      Thanks and Regards,

      Footsie

        • OLEDB read failed

          can you post the query,

          Large part of the time , it is due to a mismatch between the SQL sentence and the LOAD sentence.

           

          Thanks

           

          Philippe

          • OLEDB read failed
            Zhou Dz

            Hi, I meet the same error these days. It spent me 5days to find the solution...Still no answer. I find out if I load some of data it's ok , but failed in some certain record. And I focus on such a record which has some field's value is strange ,not stardard character. And if I jump the record it's ok. But I still don't know how could I read these strange character.

              • OLEDB read failed
                Erich Shiino

                Hi, Footsie. It happened to me before when I got some functions that run on toad, but somehow were not recognized through OLEDB connection (I believe it was a limitation on the driver because I got problems with different fuctions using different drivers).

                So, to proceed I'd like to take a look at the fuctions you are calling on select statement.

                 

                Philippe post also makes sense because the sql query can accept some structures that QV can't. For example, you could call the same field twice, or rename two fields to have the same name and then on a Load *; you will get a problem.

                 

                Sometimes, you can try to use another driver (if it's available) to check if you get the same error.

                 

                Hope it helps,

                 

                Erich

              • OLEDB read failed

                I had the same issue with one of the SQL query and I've managed to resolve it by making sure all the column names have valid names defined (ex: select count(*) as 'colum name' ....).

                • OLEDB read failed

                  Based on my experience OLEDB read failed is caused by duplicate column name, check whether all columns have different names then reload.

                   

                  ex:

                  select

                  date,

                  column1,

                  timestamp(date) as date

                  from table1

                    • OLEDB read failed

                      Hi,

                       

                      I am also facing the same problem from a number of days.  The most confusing thing is, the same query once fails due to OLEDB read failed, and runs successfully in the next run. I checked and found no error in the DB side.

                       

                      There are no duplicate field names in my query. I ensured it with priority.

                       

                       

                      @ Philippe : Could you please explain, what you meant, when you said

                      "Large part of the time , it is due to a mismatch between the SQL sentence and the LOAD sentence."

                        • Re: OLEDB read failed
                          Zhou Dz

                          Try to reduce the table to 1field . Then load the table. If no error,add 1 field, load table of 2 fields. If no error add other field until you get an error. Then you will focus on which field make the error. I think some field make the oledb error. Delete the field or do something else to make it correct.

                           

                          发自我的 iPad

                            • Re: OLEDB read failed

                              Hi,

                               

                              Many thanks for your reply.

                              The main problem is I am not experiencing this error everytime I am

                              reloading the application. Suppose if I receive the OLEDB read failed

                              error at a time, the same application is reloaded successfully after 10

                              minutes.

                               

                              Also the case is not for only one application, I am receiving this error

                              for the applications fetching data from many Databases at different times.

                              I also checked for logshipping or any workflow running in the DB side, but

                              there also I found nothing suspicious.

                               

                              Could you kindly let me know your comment on the same.

                               

                              Sayak Roy

                              Tata Consultancy Services

                                • Re: OLEDB read failed

                                  Hi,

                                   

                                  I checked the timing of the failed part of the Query and the same Query on

                                  any successful day, but I couldn't find any such difference in time by

                                  which we can get sure of it.

                                  The failed part of the Query naturally takes lesser time to get reloaded

                                  than the successful one.

                                   

                                  "Once I notice the error occurs because of some records"

                                  Can you please tell me whether you are saying about any particular

                                  datatype.

                                   

                                  Sayak Roy

                                  Tata Consultancy Services

                                    • Re: OLEDB read failed
                                      Zhou Dz

                                      Some records are Chinese charactors. But they are in messy code. I deleted these messy code. Then "no error"

                                        • OLEDB read failed

                                          I have the same issue. Sometimes the reload works and sometimes not even though the data is exactly the same.

                                          I especially found this issue to occur when using the timestamp datatype and date functions such as from_tz.

                                          It sounds like an oledb driver issue rather than qv issue when googling it. sadly that does not help I guess.

                                • Re: OLEDB read failed

                                  Same thing happended to me!

                                   

                                  What is even more frustrating is that I have seen error messages before saying duplicate column names, and thus, the error was VERY easy to find.

                                   

                                  I think I know why, in my case at least, I didn't get this "duplicate columns" error message.

                                   

                                  My load statement which was giving me the error was below;

                                   

                                  LOAD DateId,

                                      HoursWorked,

                                      LaborHourType,

                                      LocationNum,

                                      ShiftCount,

                                      0                                                  as tODS_TransactionType_Key,

                                      1                                                  as tODS_TransactionSuperChannel_Key,

                                      0                                                  as tODS_LocationType_Key_Global,

                                      0                                                  as PlanFlag,

                                      0                                                  as StoreOpsGoal,

                                      0                                                  as SalesTranCountGoal,

                                      0                                                  as SoldSalesGoal,

                                      0                                                  as SoldUnitsGoal,

                                      0                                                  as VisitsGoal,

                                      0                                                  as GmPlan,

                                      0                                                  as SalesPlan,

                                      0                                                  as SalesForecast,

                                      1                                                  as PlanFlag;      

                                  SQL SELECT DateId,

                                      HoursWorked,

                                      LaborHourType,

                                      LocationNum,

                                      ShiftCount

                                  FROM EDW.Logical."vEDW_R_TimeAttend_v2"

                                  where DateId >= 20100131;

                                   

                                  You notice thw two "PlanFlag" columns are both "derived", and I think this may be why the error message I was received was the cryptic OLE DB error.  Previously, I had the duplicate columns in the actual SQL select..

                                   

                                  Anyone else seen this?

                                • Re: OLEDB read failed

                                  Hello there,

                                  I am experirnceing the same error and as I am quite new to QV I gather that in my case the solution is elementary...

                                  I have noticed that this message occurs ONLY when I add this line in the expression

                                  "Count(DISTINCT(OrderID)) AS OrderIDRecordCounter"

                                  is the expression wrong or are there other factors to be considered?

                                  Thanks!

                                  • Re: OLEDB read failed
                                    Michael Taylor

                                    Ok, this is how I fixed my rendition if this error:

                                     

                                     

                                    !)  When into my SQL Server Management Studio and highlighted the SQL code into the 'Design' option to visually see the stored procedure in the design grid.  When I did I noticed a field had 'Expr1' in the alias column.  So I realized Qlikview was getting a datatype mismatch because my: 

                                     

                                    CASE

                                     

                                    WHEN OE.WORK_PERMIT_FLAG = 1 THEN 'Yes' ELSE 'No' END AS

                                    WORK_PERMIT_FLAG

                                     

                                     

                                    column was missing the '

                                    AS 

                                    WORK_PERMIT_FLAG'  alias declaration in the code.  Once I properly aliased the field the error was gone.  I hope this helps.  Make sure your columns are aliased properly or your datatypes in your calculated fields are properly declared to match.  Thanks, again.

                                    • Re: OLEDB read failed
                                      etay elazar

                                      Hi There.

                                      We have run into issues like this in the past.

                                      Sometimes you get an oledb message, and when you press OK there is still data coming in.

                                      If you limit the number of rows selected the query works.

                                      OLEDB and ODBC both may encounter s record containing a non standard character and raise an exception.

                                       

                                      Is any one aware of a limit on the number of lines that can be extracted via OleDB from LDAP ??