C# Application locking tables

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
Stanton_RouxAsked:
Who is Participating?
 
dttriConnect With a Mentor Commented:
Greetings,
This article contains information on transaction isolation level in MS SQL Server:
http://msdn2.microsoft.com/en-US/library/ms173763.aspx
0
 
bdsmithbackCommented:
What database are you using?
0
 
Stanton_RouxAuthor Commented:
I am using a SQL 2000 database.
0
 
dttriCommented:
SQL 2000 include a book online for you. Just open it and search for "transaction isolation level"
0
 
pgloorCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.