If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > how to check multi-user updating the same record?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-01-03, 22:25
tyf tyf is offline
Registered User
 
Join Date: Jul 2003
Location: Malaysia
Posts: 2
Talking how to check multi-user updating the same record?

hi,
recently i received an error message from my user as following:

Microsoft Cursor Engine (-2147217864): Row cannot be located for updating. Some values may have been changed since it was last read.

after a few investigation, i found this error was caused by 2 of the users updating the same record at the same time at different pc.
Is it anyway to check whether the record is updating by multi user?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 09-03-03, 23:04
g_srinivas g_srinivas is offline
Registered User
 
Join Date: Mar 2003
Posts: 12
Re: how to check multi-user updating the same record?

Hi,

I am not sure which database you are using. But what I can tell you is if you're using ADO, you can include the "Mode=Share Deny Read|Share Deny Write" in the Provider in order to restrict the user access to 1 user at a time.

Regards,

Srinivas.


Quote:
Originally posted by tyf
hi,
recently i received an error message from my user as following:

Microsoft Cursor Engine (-2147217864): Row cannot be located for updating. Some values may have been changed since it was last read.

after a few investigation, i found this error was caused by 2 of the users updating the same record at the same time at different pc.
Is it anyway to check whether the record is updating by multi user?

Thanks.
Reply With Quote
  #3 (permalink)  
Old 09-04-03, 21:49
tyf tyf is offline
Registered User
 
Join Date: Jul 2003
Location: Malaysia
Posts: 2
Re: how to check multi-user updating the same record?

Hi Srinivas,
Thanks for your advice.
Currently I'm using ADO connection access to MSSQL database. By using the way u propose to me, it still return me an error as stated above. What I need is to get which record have been updated by user B so I can notify user A that the record is being changed by user B.

Regards,

Yee Fan.


Quote:
Originally posted by g_srinivas
Hi,

I am not sure which database you are using. But what I can tell you is if you're using ADO, you can include the "Mode=Share Deny Read|Share Deny Write" in the Provider in order to restrict the user access to 1 user at a time.

Regards,

Srinivas.
Reply With Quote
  #4 (permalink)  
Old 09-05-03, 00:26
g_srinivas g_srinivas is offline
Registered User
 
Join Date: Mar 2003
Posts: 12
Re: how to check multi-user updating the same record?

Hi Yee Fan,

I am not very familiar with MSSQL. To my knowledge, I do not think you would be able to do that. What you have stated is a typical example of a row lock and the message that the server/system gives is sometimes very generic (it doesn't give who is doing/has done what).

You would not be able to achieve what you've said below manually from your application. If that is the case, you have to trace each and every user's actions using your application, keep track of who updated each record first etc. and this itself would become like a database engine on its own!!! Moreover, all these are already being done by the MSSQL database which why you're getting this generic message!! You may take your DBA's help in this regard to see if something can be done.

Alternatively, you may restrict the user access to 1 user at a time or provide module level access within your application. The Share deny read|Share deny write should work. You may give me that part of the coding and I'll try to find out what's the problem.

Regards,

Srinivas.


Quote:
Originally posted by tyf
Hi Srinivas,
Thanks for your advice.
Currently I'm using ADO connection access to MSSQL database. By using the way u propose to me, it still return me an error as stated above. What I need is to get which record have been updated by user B so I can notify user A that the record is being changed by user B.

Regards,

Yee Fan.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On