Solved

C# Application locking tables

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

688 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