Solved

C# Application locking tables

Posted on 2006-07-04
5
938 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Check my code out(2) 2 53
install app on other machine 13 32
Parse the OuterHTML Data in the txtfile using c# 4 47
What is Thread.Sleep? 5 44
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
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 …

947 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

21 Experts available now in Live!

Get 1:1 Help Now