Lock Outs

Posted on 2005-04-25
Last Modified: 2010-03-19
I developed two stored procedures on Friday for two seperate Crystal Reports, every time I run them I get a message saying that I am deadlock victime, error 4001, failed to open a rowset. This does not happen for any other stored procedures, only 2 I wrote within an hour of each other. Is there any I can do about this or should I delete them and rewrite them?
Question by:polynominal
    LVL 14

    Expert Comment

    If you can wait with second report until the first one finishes, thet will be no deadlock. But if you must run these reports simultaneously, you will probably have to redesign your procedures. There's a simple rule - access tables in the same order - tis way you can get locks, but you will probably avoid deadlocks.
    LVL 9

    Accepted Solution

    use the nolock option...especialy because you have reports, which do nopt need locks on the tables...

    eg: select * from test with nolock


    Author Comment

    Hi, Thanks for the answers

    I am not running the two reports together they are being run seperately, but still lock out individually
    LVL 9

    Expert Comment

    did you tested the nolock option? did it helped or no joy?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now