Solved

C# Application locking tables

Posted on 2006-07-04
5
948 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

740 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