Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ODBC read fails

Hello,

I am facing a strange problem. I am connecting to my microsoft sql server using ODBC and the connection is successful. I am able to select tables and am able to see the data in the table rows and columns. But when I save and load, the read fails giving me an error

ODBC read failed
SQL SELECT *
FROM "TMS_Data".dbo.billingterms

Can someone help on what's going on?

regards,

Manoj Agrawal

1 Solution

Accepted Solutions
Not applicable
Author

Allen,

As mentioned in my previous post, yes I got it working. Deleted the work 'ODBC' from the connection string so that it uses OLE DB connect by default.

So now my connection string reads

CONNECT TO WEBTMS etc. etc etc.

instead of

ODBC CONNECT to WEBTMS etc etc etc

regards,

View solution in original post

12 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

I have seen this sometimes. You may need to close the QV completely, exit out and restart app and it should be fine.

Not applicable
Author

Hi Rakesh,

Thanks for the reply. However, it has been happening ever since that I have been trying fetch the data from this table and it's been couple of days now. Every time the connection is successful, i can see the tables as well as data yet the read fails.

regards,

Manoj Agrawal

Not applicable
Author

Found a solution. Just removed 'ODBC' from the connection string so that it uses OLE DB as default. Reads the data now.

thanks,

Not applicable
Author

Hi Manoj,

I'm not sure if this has been resolved for you, and I don't have an answer. I have a similar problem. I think mine stems from using an ODBC driver on my 32-bit development environment calling a stored procedure on SQL Server 2008 64-bit. We just went through a migration from SQL Server 2000 32 bit to SQL Server 2008 64-bit. All of my stored procedures that were written prior to the migration work fine, but a new one is not. I can run it in the Management Studio just fine, but I get a ODBC Read Error in QlikView. I think it has something to do with when the stored procedures were compiled. Our technicians restored a backup from the SQL Server 2000 to the SQL Server 2008. I think in doing it that way the old stored procedures weren't recompiled. I did some digging and found SQL error codes, but they don't have a Read Error. So is this issue an ODBC issue or a QlikView issue?

Here's the link to SQL error Codes.

Allen

Not applicable
Author

Allen,

As mentioned in my previous post, yes I got it working. Deleted the work 'ODBC' from the connection string so that it uses OLE DB connect by default.

So now my connection string reads

CONNECT TO WEBTMS etc. etc etc.

instead of

ODBC CONNECT to WEBTMS etc etc etc

regards,

Not applicable
Author

Hi,

I also have the same problem and have tried removing the 'ODBC' but still get the same issue, well 'OLEDB Read Failed'

I'm trying to connect to a MS Access db that I suspect is corrupt?

Any ideas?

suniljain
Master
Master

Can give me script which you write for save and load.

Not applicable
Author

Thanks but I have solved it. The access database I was connecting to seemed to have got corrupted. I went back to the previous backup and now everything works ok. The funny thing was I could open the queries in Access but I guess it must've had something to do with the way Access provides data to other programs

mike_garcia
Luminary Alumni
Luminary Alumni

The exact same behavior is seen when the user and password are not embedded in the connection string. When you connect to the ODBC/OLEDB and dont type the password in the first window (Called Connect To DataSource) but rather in a subsequent window asking specifically for the user and password, it will not be embedded and you WILL be able to select the tables and all (because you just typed the credentials), but when trying to reload, since it has no password to communicate with the source, it will fail.

Mike.

Miguel García
Qlik Expert, Author and Trainer