Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Record locking when loading data into a QV app

Hi,

Using QV10, we've started to get some problems around record locking when reloading data into our apps.  It mainly seems to happen when we reload an app from our local desktop QV that is running a SQL (2005) stored procedure from within the script.  We are using the standard ODBC SQL Server drivers to do this.

This problem seems a little intermittent, but the symptons are the SP runs very slowly (but does complete) and users in our live software application experience deadlock errors when trying to access parts of the system using the tables these SPs are using.

Has anyone else experienced similar things?  Is there a setting or way around this?  I'm not sure how QV performs its record locking, but it certainly appears to be locking something it shouldn't!

Thanks

Nick

3 Replies
danielrozental
Master II
Master II

There is a "with no locks" SQL modifier for SQL Server queries.

More info:

http://www.developerfusion.com/article/1688/sql-server-locks/4/

johnw
Champion III
Champion III

I'm unclear if you're using SQL server or some other SQL-based system.  In DB2, for instance, you must specify "for fetch only" in the SQL to prevent locks.  I assume there are similar statements in most SQL-based systems.

Not applicable
Author

Thanks Guys!

I ended up switching the Isolation level for this Stored Procedure to be Read Uncommitted, which seems to have sorted out the problem.  I still don't really understand why this would cause a problem through the ODBC driver via Qlikview and not when running through our VB.Net Application, but there you go - it's sorted anyway!