Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vijetas42
Specialist
Specialist

Simultaneous Read write data from database and qlikview

Hi All,

Is there anyway we can identify that database table is writing so qlikview need to wait while reading data from that table.

For now i am checking with NoOfRows() but, is there any other way that if database table is truncated or data write is not completed then qlikview should skip loading specific table and continue with other tables

8 Replies
tresesco
MVP
MVP

This is usually taken care by the DBMS or OS upto some extend. Generally, if a table is being written to, it would be locked and read operation would not be allowed to leave users not be worried about the data inconsistency. Qlik user or any tool reading from it for that matter should not have to be worried about  it.

vijetas42
Specialist
Specialist
Author

But,in this case when db is writing table and simultaneously qlikview is reading then it will override existing qvd with 0 records that i want to avoid.

marcus_sommer

An alternatively might be to send an error-message drom the db to Qlik if the table is locked and using then ERRORMODE to fetch the error. But I think it's not easier than your noofrows() approach - at least within the first step because you might create some kind of loop repeating the query n times and waiting n seconds between the iterations before skipping the task.

- Marcus

tresesco
MVP
MVP

I guess, in that case your NoOfRows() approach would a good one. (as already marcus_sommer‌ suggested below)

vijetas42
Specialist
Specialist
Author

Is there any predefined function or can we write anything to identify from qv end that DB table is in writing mode

Regards,

Vijeta

marcus_sommer

No there is not. The db must create an error-message and the used sql-driver must transfer them and then you could fetch them with a query on the ScriptError variable.

- Marcus

vijetas42
Specialist
Specialist
Author

can we use NO LOCK in qlikview

marcus_sommer

Its not a matter of qlik else of the capabilities of the db and the driver.