[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Shail

9/2/2002 6:29:00 AM

Hi Everyone,

I m doing the coding first time with the Ingres database in Asp.net. I need
to lock the record thile reading thorough the asp.net. Now pls tell me how
can achive this so that other user at the same time cannot update this
record which already locked by one user. The another thing is I want to
decrease the timeout with the record lock, i tried to lock the record
explicitly but the record then locks for 180 seconds (3 minutues). So how do
i decrease this? is it something to do with ODBC or OLEDB? or may be with
machine.config settings..

I would be great to have your time and advise.
Thanks in advance for your help

Shail




1 Answer

(Hussein Abuthuraya(MSFT))

9/4/2002 9:48:00 PM

0

Shail,

You need to wrap the connection that you used to execute the Select statement in a Transaction. Then you need to set the IsolationLevel to RepeatableRead. You may
read more about this in the .NET SDK. Here is a link to this topic:

IsolationLevel Enumeration
ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemdataisolationlevelclasstopic.htm

From that topic:
RepeatableRead - Locks are placed on all data that is used in a query, preventing other users from updating the data.

I hope this helps!


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.co....