Solved

C# Application locking tables

Posted on 2006-07-04
5
935 Views
Last Modified: 2012-05-05
Hi There

I have a application written in c# that imports data into a database every couple of seconds.
I also have a website that talks to the same database.

My problem is that when the application inserts or updates data it locks the table that it is updating.
This Causes  request from the website to fail when searching for data in those tables.

The request from the website should take preferrence over everything.

So is there a way of configuring SQL to set priority to a particular transaction or to help solve this problem.
Or is there a way either in code or by configuring SQL so that the application only locks the record
that it is using and not the whole table.

thanks
0
Comment
Question by:Stanton_Roux
5 Comments
 
LVL 2

Expert Comment

by:bdsmithback
ID: 17039953
What database are you using?
0
 
LVL 7

Accepted Solution

by:
dttri earned 500 total points
ID: 17040043
Greetings,
This article contains information on transaction isolation level in MS SQL Server:
http://msdn2.microsoft.com/en-US/library/ms173763.aspx
0
 

Author Comment

by:Stanton_Roux
ID: 17040618
I am using a SQL 2000 database.
0
 
LVL 7

Expert Comment

by:dttri
ID: 17040888
SQL 2000 include a book online for you. Just open it and search for "transaction isolation level"
0
 
LVL 5

Expert Comment

by:pgloor
ID: 17040942
If the current state of your data really doesn't matter, you can try to use a locking hint in your query, like

SELECT * FROM  table
WITH (NOLOCK)
WHERE ...

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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