.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Why does RowLock result in a Page Lock

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :Sql Server
Hi, I am having a problem where even though I have indicated a rowlock it results in a page lock and a subsequent process is unable to access the table till the first process has commited.   Sample code is below.   Process 1 Begin Transaction SELECT EmpName FROM fEmployee WITH (ROWLOCK) WHERE EmpNo = 1 PRINT fEmployee.EmpName -- will print 'Sam' UPDATE fEmployee SET EmpName = 'Bob'  WHERE EmpNo = 1 .... .... .... Lots of other related processing takes place here and then finally COMMIT TRANSACTION Process 2 Begin Transaction SELECT EmpName FROM fEmployee WITH (ROWLOCK) WHERE EmpNo = 2 PRINT fEmployee.EmpName -- will print 'Rick' UPDATE fEmployee SET EmpName = 'Paul'  WHERE EmpNo = 2 .... .... .... Lots of other related processing takes place here and then finally COMMIT TRANSACTION When I run process 1 and process 2 at the same time, till process 1 commits the transaction, process 2 does not perform the Select and print the name. Why is this the case as they are both selecting different records and the Select has specifically indicated a RowLock. What I noticed was that when the rows are in the same page this problem occurs, while if the records are in different pages (assuming the data is large in the table and the gap between the empno's are large) it does not occur. Any help appreciated. Thanks

View Complete Post

More Related Resource Links

How to send form result to e-mail from aspx page ?

Hello , I'm stuck with this problem. I have aspx page , (.net 4 , web form ) on this page I have 3 text fields, 3 radio buttons groups, and 6 checkboxes, and button ( submit) . I'm trying to send data to e-mail using button event. The problem which I found that CheckBoxes giving boolean, I want transfer it to Yes or Not. Radio button giving boolean or integer as well. And another problem, I want to send only part which has been answered. empty ( NULL ) field should be ignored. If you can point me in right direction could be cool. What the best way for this? Thank you!

Probleme custom result page



I have create a custom result page to show my search result into my theme.

I have configure into the site collection, the search settings to show result in my page and not in the Search Center.

My problem is when i start a search i have no results.

But if i delete the '&u' parameter in my URL, it will show the good results.

How can i disable this parameter without using javascript ?




value in gidview subtracted the value from textbox.txt in webpage and show result to another page


please help me to solve my problem

i have webpage(vb) display data in formview ,  i want to put a textbox and a button at the bottom of webpage, when user  input in textbox some value, for example is 500 and click the button then the values  > 500 on that formview (or gridview ) will subtracted 500 and all  new value will display in new page. thank


Custom title on result page? (with BDC)



I have a little problem with my search server: I use an BDC because I want index this Table, all is good, but when I search something, I display weird number as title:

(I search keyword: "meow")

123546 … Mr Leon … meow Toulouse Paris test super!
Date : 21/10/2010

456789 … Madame Durant … meow Orléans
Date : 21/10/2010


My table on database:

Mr Leon   meow Toulouse Paris test super!
plip   WoufWou
Madame Durant   meow Orléans

I want to change this number (200) with Id on my DataBase! anyone know how I can do that? Or how I can find this Id?


How to Transfer Search Result/Gridview onto a different page?


Hello Everyone,

I am new at this VB/Microsoft Visual Web Developer 2010 Express thing. I am amaze that I even got this far and thatI manages to make this search page work. Below is the code and picture for this search page. It's working. However I want to transfer the result/the gridview onto a second page Result.aspx. But I tries all kind of thing and it just doesn't seem to want to cooperate with me. If anyone can give me some hint/some sample codes on how I might be able to transfer controlfrom one page onto another. That would be greatly appreciated. And if you can please be as detail as possible - I am extremely newat this, and just have to learn it from a class extra credit project. Thank you in advance. -Also in the picture above I am using a direct connection to an Access database not the ObjectDataSource. I was just playing around with it to see which is better. But I ended up going with direct connection to Access database.



<%@ Page Language="VB" ClassName="SenderClass" EnableSessionState="True" %>


<script runat="server">

Sub closeSite(ByVal

Open a custom page on click of a result from Search Result screen



We are in process of designing the architecture of our sharepoint application. We have a tweeky requirement.

From the default search results page, if user click on one of the result, a custom page should open which not only display the actual result text but this page should have the concatenated string of text from some other items.

For instance:

there are 2 lists:

List A with an item with text "Design: Complex hierarchy"

and List B with an item with text "Design: Hello"

If user searched "Complex" then a click on the result on search results page should open a page with this content

"Design: Complex hierarchy (tab)(tab...) Design:Hello"

Any solution or direction is welcome.


lock page in memory


Hi All,

Can any one tell me what is the lock page in memory.what the purpuse of this and how can we can do that??


Pawan Singh




Search result link goes to page but not tab on page

I have a sharepoint page that has a java tab control on it to represent sub categories of the page content. Say the 3rd tabs content is about commissions. Now I'm on another page and use search and type "commissions" and see it in the results. When I click that link it brings me to the main page that has the tabs, but not to the tab about commissions. Is there a way to make it go to the specific tab?

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

Reduce ASP.NET Page size and complexity using JQuery

This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.


I have 2 web pages. First page has a textbox and a button control.

when I enter test and click on the button , system goes to the second page. And in the second page I want to access the Textbox in the first page. When I try to do this I get the following error.

"Object reference not set to an instance of an object. Following is my code :

Dim txt As New TextBox

' Find the server name on the previous page
txt = CType(Page.PreviousPage.FindControl("TextBox2"), TextBox)
If Not IsNothing(txt) Then
Response.Write("[Name Not available]")
End If

I know I could do this with session, but I want to use the Page.PreviousPage.FindControl. Any help is greatly appreciated

Unique content within master page based on conditions met


 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?


Launch CMD File From ASPX Page


My organization uses a CMD file to install updated files for a major enterprise application. Currently, we send out an email to users with a link to the file and instructions to run it, BUT inevitably users don't update their machines until their in field and try to start the app.


We're now liking the idea of using an ASPX page to prompt the users to run the updates and to capture the fact that the updates have been run. I realize that we can't capture the success or failure of the update. But we'd like to capture the user accessed the page.


Is it possible to embed into the markup for the page a link to the file on the local intranet that the users can click on to run the file?

The user accessing the page would capture that they did just that. We'd deal with wether or not the update was actually installed or if it failed later with them directly.

Handling 404 page not found with Error page



      How do i handle 404 page not found?

Setting the default start page in godaddy hosting?


 How do you set the start page with godaddy hosting? I can see no way of doing this! You do not seem to have access to the IIS settings that allow you to change it!

Need help redirecting users to personalized page


 Hi, first timer here so be gentle.


I've been able to create a cool little website, it's up and running with users logging in and out, I created roles so my administrative team can see sensitive data that's not available to regular and anonymous users.

Now they would like me to create a page specific to each user.  For instance when user A logs in they are redirected to a page that has information that pertains to user A only (like a list of their benefits/ their remaining vacation time). This page needs to be accessible only to user A. 

I've watched a ton of the videos but have yet to see one that covers this topic, any help would be great!!!





ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend