HI..does anyone would like to suggest what application should i develop that could i apply a Locking ..any useful application.

i already read about this topic and i find it interesting and id like it to be my thesis..

Hope you can help me to this...

Lock what? A file? A license key to "lock" the application after a demo period expired?

I don't understand what you are asking...

in databse ...lock tables or pages, rows..like that..
any web applications where i can apply this locking method .

Develop an invoicing system with customers and line items for sale. Lock the table while the invoice is being updated. Here is a sample customer table (MSSQL):

IF OBJECT_ID('Test123', 'U') IS NOT NULL DROP Table Test123
Create Table Test123
(
  Name varchar(20) PRIMARY KEY,
)
GO
Insert Into Test123 (Name) Values ('Scott')
GO

BEGIN TRANSACTION
Update Test123 WITH (TABLOCKX,HOLDLOCK) Set Name = 'abc'

Select *
From Test123 WITH (TABLOCKX,HOLDLOCK)
waitfor delay '00:01:30'

--Go do something in another query.. the table cant be accessed without (NOLOCK)

COMMIT

tnx for the suggestion...can you please expound more about the invoicing system you suggest..

is mssql is much better to use than mysql...? coz for my 2 yrs in database field im using mysql and never use an mssql...and just want to know if mssql is best use for locking..

can you explain line 11 -14..i just dont able to get it well...
i think my understanding is different..i just want to know the correct understanding of it..

BTW..thanks for this..now i have an application to propose...

Why are you concentrating on locking so much? What lines 11-14 does it request a table lock on Test123 and other connections/transactions cannot access the table since it is locked until the txn completes. I added the delay in there so you would have 30 seconds to try to access the table but they will all hang up until the locking txn completes.

im trying to solve concurrency control in database..thats why i always ask question about locking..

and if i understand so much about locking ill make it as my thesis..

but if you have some suggestions about thesis topic it would be a great help ..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.