Click here to Skip to main content
15,892,298 members
Home / Discussions / Database
   

Database

 
GeneralLocking Database Pin
WinDotNet16-Sep-04 0:53
WinDotNet16-Sep-04 0:53 
GeneralRe: help in simple access query Pin
David Salter16-Sep-04 10:37
David Salter16-Sep-04 10:37 
GeneralRe: help in simple access query Pin
Mekong River16-Sep-04 15:22
Mekong River16-Sep-04 15:22 
QuestionHow to get two or more params' value in the Extend Procedure DLL ? Pin
fu015-Sep-04 22:21
fu015-Sep-04 22:21 
AnswerRe: How to get two or more params' value in the Extend Procedure DLL ? Pin
David Salter16-Sep-04 10:43
David Salter16-Sep-04 10:43 
QuestionCan set auto-increament value in Ms Access database? Pin
DotNet15-Sep-04 21:57
DotNet15-Sep-04 21:57 
AnswerRe: Can set auto-increament value in Ms Access database? Pin
David Salter16-Sep-04 10:34
David Salter16-Sep-04 10:34 
GeneralHelp required for implementing the rowlevel locking trough ADO Connection Object Pin
chintan197915-Sep-04 20:42
chintan197915-Sep-04 20:42 
Dear All,

I need the help for implementing the row level locking in my transaction-based form.

Following is the details of the working logic and the problem faced by me : -


Front End: MS Visual Basic 6.0
Back End: MS SQL Server 2000.

In one of my form first the user makes the document and saves it. While saving the document numbers is generated and then the details are saved in the detail table and one entry will be passed in the header table. After which the user needs to do the authorization of the same.

In the authorization form when the user selects the particular document for authorization then in the lost focus of the document number text box I want to lock the record for that document in the header table. The table contains precisely one record for each document.

I first BEGIN the transaction for the connection object I’m using and then I set the LOCK_TIMEOUT property to 0, by executing the statement 'SET LOCK_TIMEOUT 0' through the connection object. Then I execute the following statement: -

SELECT * from HEADERTBL WITH (UPDLOCK) where GRNNO='001'

But when I go back to SQL Server and execute the SP_LOCK procedure that gives me the status of locks hold by SQL Server. It shows that the record that I want is locked by Update lock but the other records are also locked by SHARED Lock, which I don’t want. After going through the number of records locks it was found that it locks the whole page by default with SHARED Lock and the record matching the where condition with the lock specified.

The problem is that if some other user when tries to lock some other document for UPDATE Lock then SQL Server refuses that until the rows locked previously are released.

Is anybody can help to set some property through ADO or directly so the records matching the where condition are only locked and other users are also allowed to lock other records then the one already locked. Also the locked records need to be allowed to read by all the users as they take the help for document number and due to which I was unable to use EXCLUSIVE Locks.

Revert back in case of any further details are required.



Chintan
GeneralRe: Help required for implementing the rowlevel locking trough ADO Connection Object Pin
Steven Campbell16-Sep-04 8:41
Steven Campbell16-Sep-04 8:41 
GeneralRe: Help required for implementing the rowlevel locking trough ADO Connection Object Pin
WinDotNet6-Oct-04 22:50
WinDotNet6-Oct-04 22:50 
GeneralADO Connection Application Pin
Greg Horwood15-Sep-04 16:06
Greg Horwood15-Sep-04 16:06 
GeneralRe: ADO Connection Application Pin
Steven Campbell16-Sep-04 8:30
Steven Campbell16-Sep-04 8:30 
GeneralRe: ADO Connection Application Pin
Greg Horwood16-Sep-04 13:24
Greg Horwood16-Sep-04 13:24 
GeneralRe: ADO Connection Application Pin
RichardGrimmer17-Sep-04 5:37
RichardGrimmer17-Sep-04 5:37 
GeneralRe: ADO Connection Application Pin
Anonymous17-Sep-04 15:23
Anonymous17-Sep-04 15:23 
QuestionHow to connect to MSSQL through SSL channel using ADO Pin
Zro15-Sep-04 15:32
Zro15-Sep-04 15:32 
AnswerRe: How to connect to MSSQL through SSL channel using ADO Pin
Zro15-Sep-04 15:43
Zro15-Sep-04 15:43 
QuestionHo do i connect to an XML file using C#.net? Pin
JDUK15-Sep-04 14:04
JDUK15-Sep-04 14:04 
AnswerRe: Ho do i connect to an XML file using C#.net? Pin
Christian Graus15-Sep-04 15:08
protectorChristian Graus15-Sep-04 15:08 
GeneralRe: Ho do i connect to an XML file using C#.net? Pin
JDUK15-Sep-04 15:27
JDUK15-Sep-04 15:27 
GeneralRe: Ho do i connect to an XML file using C#.net? Pin
Christian Graus15-Sep-04 15:30
protectorChristian Graus15-Sep-04 15:30 
GeneralCommand builder and retrieving autoincrement values Pin
maciekj15-Sep-04 11:23
maciekj15-Sep-04 11:23 
QuestionCan I delete completely a mdb file? Pin
ATC15-Sep-04 6:48
ATC15-Sep-04 6:48 
AnswerRe: Can I delete completely a mdb file? Pin
David Salter16-Sep-04 10:45
David Salter16-Sep-04 10:45 
GeneralError Handling in exception Pin
DotNet15-Sep-04 4:56
DotNet15-Sep-04 4:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.