help in database updations.

S

SPG

Hi all,

Let me first explain what I am trying to do. I have a web app, where from my
asp page, i call a stored procedure.

Now this page is used by N users concurrently. This SP updates a table,
updates a second table with first as ref,

and clear first table. in between there is a delay of few seconds, which i
have explicitly put( waitfor delay command)


but teh problem appears when some users at the same time use this page, and
update table, then the records by only one user are present in the table,
the same for all teh other users are found missing later.

why are the updations made by the other users not updated in the second
table?

what am I missing here?

TIA.
 
A

Andrew John

SPG,

Agree - post your code if you want help with it.

Some comments in line:

SPG said:
Hi all,

Let me first explain what I am trying to do. I have a web app, where from my
asp page, i call a stored procedure.

Now this page is used by N users concurrently. This SP updates a table,
updates a second table with first as ref,

and clear first table. in between there is a delay of few seconds, which i
have explicitly put( waitfor delay command)

Are ye mad ! A waitfor delay command has no place there. The cure is FAR worse
than the disease.
but teh problem appears when some users at the same time use this page, and
update table, then the records by only one user are present in the table,
the same for all teh other users are found missing later.

Need to read up on concurrency and record locking.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,147
Messages
2,570,837
Members
47,385
Latest member
Joneswilliam01

Latest Threads

Top